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

Side by Side Diff: test/cctest/compiler/test-run-jsops.cc

Issue 1571873004: Ship ES2015 sloppy-mode const semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Associate with --harmony-shipping Created 4 years, 11 months 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/flag-definitions.h ('k') | test/cctest/compiler/test-run-variables.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "test/cctest/compiler/function-tester.h" 5 #include "test/cctest/compiler/function-tester.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TEST(GlobalLoad) { 388 TEST(GlobalLoad) {
389 FunctionTester T("(function() { return g; })"); 389 FunctionTester T("(function() { return g; })");
390 390
391 T.CheckThrows(T.undefined(), T.undefined()); 391 T.CheckThrows(T.undefined(), T.undefined());
392 CompileRun("var g = 23;"); 392 CompileRun("var g = 23;");
393 T.CheckCall(T.Val(23)); 393 T.CheckCall(T.Val(23));
394 } 394 }
395 395
396 396
397 TEST(GlobalStoreSloppy) { 397 TEST(GlobalStoreSloppy) {
398 FLAG_legacy_const = true;
398 FunctionTester T("(function(a,b) { g = a + b; return g; })"); 399 FunctionTester T("(function(a,b) { g = a + b; return g; })");
399 400
400 T.CheckCall(T.Val(33), T.Val(22), T.Val(11)); 401 T.CheckCall(T.Val(33), T.Val(22), T.Val(11));
401 CompileRun("delete g"); 402 CompileRun("delete g");
402 CompileRun("const g = 23"); 403 CompileRun("const g = 23");
403 T.CheckCall(T.Val(23), T.Val(55), T.Val(44)); 404 T.CheckCall(T.Val(23), T.Val(55), T.Val(44));
404 } 405 }
405 406
406 407
407 TEST(GlobalStoreStrict) { 408 TEST(GlobalStoreStrict) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 "})"; 536 "})";
536 FunctionTester T(src); 537 FunctionTester T(src);
537 538
538 T.CheckCall(T.Val(65), T.Val(23), T.Val(42)); 539 T.CheckCall(T.Val(65), T.Val(23), T.Val(42));
539 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b")); 540 T.CheckCall(T.Val("ab"), T.Val("a"), T.Val("b"));
540 } 541 }
541 542
542 } // namespace compiler 543 } // namespace compiler
543 } // namespace internal 544 } // namespace internal
544 } // namespace v8 545 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/compiler/test-run-variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698