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

---
pool type: string
execute: yes
wrap: yes

---
snippet: "
  try { return 1; } catch(e) { return 2; }
"
frame size: 5
parameter count: 1
16
bytecode array length: 41
17
bytecodes: [
18 19 20 21
  /*   30 E> */ B(StackCheck),
                B(Mov), R(context), R(1),
  /*   40 S> */ B(LdaSmi), U8(1),
  /*   75 S> */ B(Return),
22
                B(Jump), U8(32),
23 24 25
                B(Star), R(3),
                B(LdaConstant), U8(0),
                B(Star), R(2),
26
                B(Mov), R(closure), R(4),
27 28 29 30 31 32 33 34 35 36
                B(CallRuntime), U16(Runtime::kPushCatchContext), R(2), U8(3),
                B(Star), R(1),
                B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
                B(Ldar), R(1),
                B(PushContext), R(0),
  /*   63 S> */ B(LdaSmi), U8(2),
                B(PopContext), R(0),
  /*   75 S> */ B(Return),
                B(LdaUndefined),
  /*   75 S> */ B(Return),
37 38 39 40 41
]
constant pool: [
  "e",
]
handlers: [
42
  [4, 7, 9],
43 44 45 46 47 48 49 50 51 52
]

---
snippet: "
  var a;
  try { a = 1 } catch(e1) {};
  try { a = 2 } catch(e2) { a = 3 }
"
frame size: 6
parameter count: 1
53
bytecode array length: 79
54
bytecodes: [
55 56 57
  /*   30 E> */ B(StackCheck),
                B(Mov), R(context), R(2),
  /*   47 S> */ B(LdaSmi), U8(1),
58
                B(Star), R(0),
59
                B(Jump), U8(29),
60 61 62
                B(Star), R(4),
                B(LdaConstant), U8(0),
                B(Star), R(3),
63
                B(Mov), R(closure), R(5),
64
  /*   49 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
65 66 67 68 69 70 71
                B(Star), R(2),
                B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
                B(Ldar), R(2),
                B(PushContext), R(1),
                B(PopContext), R(1),
                B(Mov), R(context), R(2),
  /*   75 S> */ B(LdaSmi), U8(2),
72
                B(Star), R(0),
73
                B(Jump), U8(33),
74 75 76
                B(Star), R(4),
                B(LdaConstant), U8(1),
                B(Star), R(3),
77
                B(Mov), R(closure), R(5),
78
  /*   77 E> */ B(CallRuntime), U16(Runtime::kPushCatchContext), R(3), U8(3),
79 80 81 82 83
                B(Star), R(2),
                B(CallRuntime), U16(Runtime::kInterpreterClearPendingMessage), R(0), U8(0),
                B(Ldar), R(2),
                B(PushContext), R(1),
  /*   95 S> */ B(LdaSmi), U8(3),
84
                B(Star), R(0),
85 86 87
                B(PopContext), R(1),
                B(LdaUndefined),
  /*  103 S> */ B(Return),
88 89 90 91 92 93 94
]
constant pool: [
  "e1",
  "e2",
]
handlers: [
  [4, 8, 10],
95
  [40, 44, 46],
96 97
]