Skip to content

Commit b3cec33

Browse files
committed
Add insta test
1 parent 719bb68 commit b3cec33

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let x = 10 + -1; // -1 should be treated as a single emit instruction
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
source: tests/insta-bytecode/src/lib.rs
3+
expression: output
4+
input_file: tests/insta-bytecode/scripts/arithmetic.js
5+
---
6+
-------------------------- Compiled Output: '<main>' ---------------------------
7+
Location Handler Opcode Operands
8+
000000 StoreInt8 value:10, dst:r02
9+
000006 StoreInt8 value:-1, dst:r03
10+
00000c Add lhs:r02, rhs:r03, dst:r01
11+
000019 PutLexicalValue src:r01, binding_index:0
12+
000022 CheckReturn
13+
000023 Return
14+
15+
Register Count: 4, Flags: CodeBlockFlags(HAS_PROTOTYPE_PROPERTY)
16+
Constants:
17+
0000: [STRING] "x"
18+
Bindings:
19+
0000: x, scope: GlobalDeclarative
20+
Handlers: <empty>
21+
Source Map: <empty>

0 commit comments

Comments
 (0)