Mercurial Hosting > luan
comparison core/src/luan/impl/LuanJavaCompiler.java @ 658:e038905512d3
compile ReturnStmt
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 05 Apr 2016 18:38:29 -0600 |
parents | 067d9470184d |
children | 41f8fdbc3a0a |
comparison
equal
deleted
inserted
replaced
657:8081713bf7d9 | 658:e038905512d3 |
---|---|
50 }; | 50 }; |
51 StringWriter out = new StringWriter(); | 51 StringWriter out = new StringWriter(); |
52 boolean b = compiler.getTask(out, fjfm, null, null, null, Collections.singletonList(sourceFile)).call(); | 52 boolean b = compiler.getTask(out, fjfm, null, null, null, Collections.singletonList(sourceFile)).call(); |
53 if( !b ) | 53 if( !b ) |
54 throw new RuntimeException("\n"+out+"\ncode:\n"+code+"\n"); | 54 throw new RuntimeException("\n"+out+"\ncode:\n"+code+"\n"); |
55 byte[] byteCode = baos.toByteArray(); | 55 final byte[] byteCode = baos.toByteArray(); |
56 int max = byteCode.length-len-3; | 56 int max = byteCode.length-len-3; |
57 outer: | 57 outer: |
58 for( int i=0; true; i++ ) { | 58 for( int i=0; true; i++ ) { |
59 if( i > max ) | 59 if( i > max ) |
60 throw new RuntimeException("len="+len); | 60 throw new RuntimeException("len="+len); |