GlobalCountOperators.golden 1.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: no
test function name: f

---
snippet: "
  var global = 1;
  function f() { return ++global; }
  f();
"
frame size: 0
parameter count: 1
17
bytecode array length: 10
18
bytecodes: [
19
  /*   26 E> */ B(StackCheck),
20
  /*   31 S> */ B(LdaGlobal), U8(0), U8(0),
21
                B(Inc), U8(2),
22
  /*   40 E> */ B(StaGlobal), U8(0), U8(3),
23
  /*   47 S> */ B(Return),
24 25
]
constant pool: [
26
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["global"],
27 28 29 30 31 32 33 34 35 36 37 38
]
handlers: [
]

---
snippet: "
  var global = 1;
  function f() { return global--; }
  f();
"
frame size: 1
parameter count: 1
39
bytecode array length: 16
40
bytecodes: [
41
  /*   26 E> */ B(StackCheck),
42
  /*   31 S> */ B(LdaGlobal), U8(0), U8(0),
43
                B(ToNumeric), U8(2),
44
                B(Star), R(0),
45
                B(Dec), U8(2),
46
  /*   44 E> */ B(StaGlobal), U8(0), U8(3),
47
                B(Ldar), R(0),
48
  /*   47 S> */ B(Return),
49 50
]
constant pool: [
51
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["global"],
52 53 54 55 56 57 58 59 60 61 62 63
]
handlers: [
]

---
snippet: "
  unallocated = 1;
  function f() { 'use strict'; return --unallocated; }
  f();
"
frame size: 0
parameter count: 1
64
bytecode array length: 10
65
bytecodes: [
66
  /*   27 E> */ B(StackCheck),
67
  /*   46 S> */ B(LdaGlobal), U8(0), U8(0),
68
                B(Dec), U8(2),
69
  /*   55 E> */ B(StaGlobal), U8(0), U8(3),
70
  /*   67 S> */ B(Return),
71 72
]
constant pool: [
73
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["unallocated"],
74 75 76 77 78 79 80 81 82 83 84 85
]
handlers: [
]

---
snippet: "
  unallocated = 1;
  function f() { return unallocated++; }
  f();
"
frame size: 1
parameter count: 1
86
bytecode array length: 16
87
bytecodes: [
88
  /*   27 E> */ B(StackCheck),
89
  /*   32 S> */ B(LdaGlobal), U8(0), U8(0),
90
                B(ToNumeric), U8(2),
91
                B(Star), R(0),
92
                B(Inc), U8(2),
93
  /*   50 E> */ B(StaGlobal), U8(0), U8(3),
94
                B(Ldar), R(0),
95
  /*   53 S> */ B(Return),
96 97
]
constant pool: [
98
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["unallocated"],
99 100 101 102
]
handlers: [
]