v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
Ross McIlroy c68df4110d [Interpreter] Allocate context registers as temporary registers.
Rather than trying to pre-calculate the number of contexts required during
scope analysis, instead just allocate context registers in the register
allocator. This reduces frame size a bit due to reusing of registers when
the context isn't pushed.

 BUG=v8:6322, chromium:716265

Change-Id: I145e38fcb3797a3b86c91e90ea9326a6e55b9b89
Reviewed-on: https://chromium-review.googlesource.com/514087
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45522}
2017-05-24 17:12:02 +00:00

95 lines
2.3 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: yes
---
snippet: "
try { return 1; } catch(e) { return 2; }
"
frame size: 2
parameter count: 1
bytecode array length: 30
bytecodes: [
/* 30 E> */ B(StackCheck),
B(Mov), R(context), R(0),
/* 40 S> */ B(LdaSmi), I8(1),
/* 75 S> */ B(Return),
B(Jump), U8(21),
B(Star), R(1),
B(Ldar), R(closure),
B(CreateCatchContext), R(1), U8(0), U8(1),
B(Star), R(0),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(0),
B(PushContext), R(1),
/* 63 S> */ B(LdaSmi), I8(2),
/* 75 S> */ B(Return),
B(LdaUndefined),
/* 75 S> */ B(Return),
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["e"],
FIXED_ARRAY_TYPE,
]
handlers: [
[4, 7, 9],
]
---
snippet: "
var a;
try { a = 1 } catch(e1) {};
try { a = 2 } catch(e2) { a = 3 }
"
frame size: 3
parameter count: 1
bytecode array length: 61
bytecodes: [
/* 30 E> */ B(StackCheck),
B(Mov), R(context), R(1),
/* 47 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Jump), U8(20),
B(Star), R(2),
B(Ldar), R(closure),
/* 49 E> */ B(CreateCatchContext), R(2), U8(0), U8(1),
B(Star), R(1),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(1),
B(PushContext), R(2),
B(PopContext), R(2),
B(Mov), R(context), R(1),
/* 75 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
B(Jump), U8(24),
B(Star), R(2),
B(Ldar), R(closure),
/* 77 E> */ B(CreateCatchContext), R(2), U8(2), U8(3),
B(Star), R(1),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(1),
B(PushContext), R(2),
/* 95 S> */ B(LdaSmi), I8(3),
B(Star), R(0),
B(PopContext), R(2),
B(LdaUndefined),
/* 103 S> */ B(Return),
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["e1"],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["e2"],
FIXED_ARRAY_TYPE,
]
handlers: [
[4, 8, 10],
[31, 35, 37],
]