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

Side by Side Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 1439693002: [runtime] Support Proxy setPrototypeOf trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-11-09_new_Proxy_1417063011
Patch Set: merging with master Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(jochen): Remove this after the setting is turned on globally. 5 // TODO(jochen): Remove this after the setting is turned on globally.
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 BytecodeGraphTester::NewObject("({name : 'abc'})")}}, 313 BytecodeGraphTester::NewObject("({name : 'abc'})")}},
314 {"'use strict'; return p1.val;", 314 {"'use strict'; return p1.val;",
315 {factory->NewNumberFromInt(10), 315 {factory->NewNumberFromInt(10),
316 BytecodeGraphTester::NewObject("({val : 10 })")}}, 316 BytecodeGraphTester::NewObject("({val : 10 })")}},
317 {"'use strict'; return p1[\"val\"];", 317 {"'use strict'; return p1[\"val\"];",
318 {factory->NewNumberFromInt(10), 318 {factory->NewNumberFromInt(10),
319 BytecodeGraphTester::NewObject("({val : 10, name : 'abc'})")}}, 319 BytecodeGraphTester::NewObject("({val : 10, name : 'abc'})")}},
320 {"var b;\n" REPEAT_127(SPACE, " b = p1.name; ") " return p1.name;\n", 320 {"var b;\n" REPEAT_127(SPACE, " b = p1.name; ") " return p1.name;\n",
321 {factory->NewStringFromStaticChars("abc"), 321 {factory->NewStringFromStaticChars("abc"),
322 BytecodeGraphTester::NewObject("({name : 'abc'})")}}, 322 BytecodeGraphTester::NewObject("({name : 'abc'})")}},
323 {"'use strict'; var b;\n" 323 {"'use strict'; var b;\n" REPEAT_127(
324 REPEAT_127(SPACE, " b = p1.name; ") 324 SPACE, " b = p1.name; ") "return p1.name;\n",
325 "return p1.name;\n",
326 {factory->NewStringFromStaticChars("abc"), 325 {factory->NewStringFromStaticChars("abc"),
327 BytecodeGraphTester::NewObject("({ name : 'abc'})")}}, 326 BytecodeGraphTester::NewObject("({ name : 'abc'})")}},
328 }; 327 };
329 328
330 size_t num_snippets = sizeof(snippets) / sizeof(snippets[0]); 329 size_t num_snippets = sizeof(snippets) / sizeof(snippets[0]);
331 for (size_t i = 0; i < num_snippets; i++) { 330 for (size_t i = 0; i < num_snippets; i++) {
332 ScopedVector<char> script(2048); 331 ScopedVector<char> script(2048);
333 SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName, 332 SNPrintF(script, "function %s(p1) { %s };\n%s(0);", kFunctionName,
334 snippets[i].code_snippet, kFunctionName); 333 snippets[i].code_snippet, kFunctionName);
335 334
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 946 }
948 947
949 948
950 TEST(BytecodeGraphBuilderTestInstanceOf) { 949 TEST(BytecodeGraphBuilderTestInstanceOf) {
951 // TODO(mythria): Add tests when CreateLiterals/CreateClousre are supported. 950 // TODO(mythria): Add tests when CreateLiterals/CreateClousre are supported.
952 } 951 }
953 952
954 } // namespace compiler 953 } // namespace compiler
955 } // namespace internal 954 } // namespace internal
956 } // namespace v8 955 } // namespace v8
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698