Skip to content

Commit

Permalink
Add more tests for V8 intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Sep 25, 2019
1 parent 682ffd5 commit 5a56bfc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/v8_intrinsic/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -12,10 +12,36 @@ function doSmth() {
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));
}
================================================================================
`;
19 changes: 19 additions & 0 deletions tests/v8_intrinsic/intrinsic_call.js
Expand Up @@ -3,3 +3,22 @@ function doSmth() {
(
foo )
}

function printFunc (
f
) {
if(%
IsAsmWasmCode(f)) console.log("asm.js");
if(

% IsWasmCode(
f))
console.log (
"wasm"
);

console.log
(%
GetFunctioName(f)
);
}

0 comments on commit 5a56bfc

Please sign in to comment.