-
Notifications
You must be signed in to change notification settings - Fork 24
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
Switch sources to typed arrays instead of strings #242
Conversation
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.
Great work. Two things to consider:
- There is a coverage failure.
- One small nit in the code.
I will try to pick up issues tomorrow.
I havent looked at inline assembly. Is there anything to do there?
No, I think there is nothing left.
…ve unnecessary Buffer reference in compile utils.
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.
Looks ready to merge after 73492b7.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #242 +/- ##
=======================================
Coverage 91.59% 91.60%
=======================================
Files 267 270 +3
Lines 6630 6634 +4
Branches 1353 1350 -3
=======================================
+ Hits 6073 6077 +4
Misses 291 291
Partials 266 266 ☔ View full report in Codecov by Sentry. |
…ment garbage at the begining of the fragment, including comments that are not of interest to us
Warning
This is an interface breaking change.
Change our implementation to keep source file contents as
Uint8Array
s instead ofstring
. This is needed since AST source map are actually byte offsets into the file. We were erroneously trearting them as string indices, which breaks in the presence of multi-byte Unicode characters.This involves:
compile*
interfaces to acceptMap<string, Uint8Array>
instead ofMap<string, string>
.StructuredDocumentation
pass to correctly compute docs by doing byte indexing.ASTWriter
to compute a correct map.Todo (@blitz-1306 ): I havent looked at inline assembly. Is there anything to do there?