comparison core/src/luan/impl/LuanJavaCompiler.java @ 652:067d9470184d

compile SetStmt and ForStmt
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 04 Apr 2016 23:26:06 -0600
parents d658eab7bf4c
children e038905512d3
comparison
equal deleted inserted replaced
651:140cc5191b7a 652:067d9470184d
49 } 49 }
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); 54 throw new RuntimeException("\n"+out+"\ncode:\n"+code+"\n");
55 byte[] byteCode = baos.toByteArray(); 55 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 )