-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[AssemblyScript] Added basic AssemblyScript support #6408
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
3608863
to
dd6a264
Compare
@krojew what do you think? |
d3ab3d3
to
519d1f5
Compare
519d1f5
to
f25a3d6
Compare
Just saw #6302 merged. Will likely require a good bit of massaging on my side to resolve conflicts. |
I think this might warrant a new idl_gen_as.cpp at this moment. |
@krojew Agreed. Looked over the merge into the new TS generator and it looks like combining these two would be dubious at best. I'll split out my additions into a standalone AS generator. |
…tz/flatbuffers into assembly_script_support
…tz/flatbuffers into assembly_script_support
as/byte-buffer.ts
Outdated
} | ||
|
||
readInt8(offset: i32): i32 { | ||
return (i32(this.readUint8(offset)) << 24) >> 24; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual sign extension is unnecessary when you cast to u8 -> i32
via as i32
return (i32(this.readUint8(offset)) << 24) >> 24; | |
return this.readUint8(offset) as i32; |
as/byte-buffer.ts
Outdated
readUint32(offset: i32): i32 { | ||
return this.readInt32(offset) >>> 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readUint32(offset: i32): i32 { | |
return this.readInt32(offset) >>> 0; | |
} | |
readUint32(offset: i32): u32 { | |
return this.readInt32(offset); | |
} |
e33f6ec
to
b700d3f
Compare
b700d3f
to
c071b69
Compare
fc861aa
to
50a7279
Compare
Any update on this? @LucasSwitz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple notes that describe the differences from the TypeScript generator.