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
Add support for V8 intrinsics via Babel #6496
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`intrinsic_call.js 1`] = ` | ||
====================================options===================================== | ||
parsers: ["babel"] | ||
printWidth: 80 | ||
| printWidth | ||
=====================================input====================================== | ||
function doSmth() { | ||
%DebugPrint | ||
( | ||
foo ) | ||
} | ||
|
||
function printFunc ( | ||
f | ||
) { | ||
if(% | ||
IsAsmWasmCode(f)) console.log("asm.js"); | ||
if( | ||
|
||
% IsWasmCode( | ||
f)) | ||
console.log ( | ||
"wasm" | ||
); | ||
|
||
console.log | ||
(% | ||
GetFunctioName(f) | ||
); | ||
} | ||
|
||
=====================================output===================================== | ||
function doSmth() { | ||
%DebugPrint(foo); | ||
} | ||
|
||
function printFunc(f) { | ||
if (%IsAsmWasmCode(f)) console.log("asm.js"); | ||
if (%IsWasmCode(f)) console.log("wasm"); | ||
|
||
console.log(%GetFunctioName(f)); | ||
} | ||
|
||
================================================================================ | ||
`; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function doSmth() { | ||
%DebugPrint | ||
( | ||
foo ) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you expand the test coverage to have other places where v8 intrinsics are used? One test seems light. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added few more, although it's not very easy to be creative with something like this :) |
||
|
||
function printFunc ( | ||
f | ||
) { | ||
if(% | ||
IsAsmWasmCode(f)) console.log("asm.js"); | ||
if( | ||
|
||
% IsWasmCode( | ||
f)) | ||
console.log ( | ||
"wasm" | ||
); | ||
|
||
console.log | ||
(% | ||
GetFunctioName(f) | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(__dirname, ["babel"]); |
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.
Did you grep the file for “Identifier” to see if there are others to update?
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.
Yes.
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.
(others don't seem relevant, and, as turns out, even the JSON one is not)