Index: test/cctest/interpreter/test-bytecode-generator.cc |
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc |
index 4177e07dc28697ef27aff8b72e260384f69828e2..d5d71c8b7b6a52a0583bba8fe26295588d720692 100644 |
--- a/test/cctest/interpreter/test-bytecode-generator.cc |
+++ b/test/cctest/interpreter/test-bytecode-generator.cc |
@@ -4495,21 +4495,25 @@ TEST(IllegalRedeclaration) { |
InitializedHandleScope handle_scope; |
BytecodeGeneratorHelper helper; |
- ExpectedSnippet<const char*> snippets[] = { |
+ CHECK_GE(MessageTemplate::kVarRedeclaration, 128); |
+ // Must adapt bytecode if this changes. |
+ |
+ ExpectedSnippet<Handle<Object>, 2> snippets[] = { |
{"const a = 1; { var a = 2; }", |
3 * kPointerSize, |
1, |
14, |
{ |
- B(LdaSmi8), U8(MessageTemplate::kVarRedeclaration), // |
- B(Star), R(1), // |
B(LdaConstant), U8(0), // |
+ B(Star), R(1), // |
+ B(LdaConstant), U8(1), // |
B(Star), R(2), // |
B(CallRuntime), U16(Runtime::kNewSyntaxError), R(1), U8(2), // |
B(Throw), // |
}, |
- 1, |
- {"a"}}, |
+ 2, |
+ {helper.factory()->NewNumberFromInt(MessageTemplate::kVarRedeclaration), |
+ helper.factory()->NewStringFromAsciiChecked("a")}}, |
}; |
for (size_t i = 0; i < arraysize(snippets); i++) { |