Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1441043002: [proxies] Implement [[PreventExtensions]] and [[IsExtensible]]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/harmony/proxies-is-extensible.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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++) {
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/harmony/proxies-is-extensible.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698