Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodBuilder.addAsmSource() #1034 conversion error #144

Open
GoogleCodeExporter opened this issue Mar 13, 2016 · 0 comments
Open

MethodBuilder.addAsmSource() #1034 conversion error #144

GoogleCodeExporter opened this issue Mar 13, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Define a method body using a string source

var source:String = (<![CDATA[
   getlocal_0
   pushscope
   getlocal_1
   pushint 100
   multiply
   setlocal_1
   getlocal_1
   returnvalue
]]>).toString();

methodBuilder.addAsmSource(source);

___

What is the expected output? 

methodBuilder.addAsmSource should generate the method body.

___

What do you see instead?

Error:
#1034: Array to vector conversion

___

What version of the product are you using? On what operating system?

as3commons-bytecode-1.1.1 on Windows 8

___

Posible fix:
On org.as3commons.bytecode.emit.impl.MethodBodyBuilder
Line 397
Change: addOpcodes(result[0]);
To: addOpcodes(Vector.<Op>(result[0]));

Line: 431
Chage:_backpatches = _backpatches.concat(newBackpatches);
To: _backpatches = _backpatches.concat(Vector.<JumpTargetData>(newBackpatches));

Original issue reported on code.google.com by [email protected] on 10 Feb 2014 at 3:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant