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

Side by Side Diff: test/mjsunit/es6/block-scoping.js

Issue 1396333010: [turbofan] Initial support for monomorphic/polymorphic property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Work-around register allocator bug. Created 5 years, 2 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/objects-inl.h ('k') | test/mjsunit/harmony/block-scoping-sloppy.js » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 assertEquals(4, z); 83 assertEquals(4, z);
84 assertEquals(5, u); 84 assertEquals(5, u);
85 assertEquals(6, v); 85 assertEquals(6, v);
86 assertEquals(7, a.foo()); 86 assertEquals(7, a.foo());
87 assertEquals(8, b.foo()); 87 assertEquals(8, b.foo());
88 } 88 }
89 } 89 }
90 for (var j = 0; j < 5; ++j) f3(1); 90 for (var j = 0; j < 5; ++j) f3(1);
91 %OptimizeFunctionOnNextCall(f3); 91 %OptimizeFunctionOnNextCall(f3);
92 f3(1); 92 f3(1);
93 assertTrue(%GetOptimizationStatus(f3) != 2);
94 93
95 94
96 95
97 // Dynamic lookup from closure. 96 // Dynamic lookup from closure.
98 function f4(one) { 97 function f4(one) {
99 var x = one + 1; 98 var x = one + 1;
100 let y = one + 2; 99 let y = one + 2;
101 const u = one + 4; 100 const u = one + 4;
102 class a { static foo() { return one + 6; } } 101 class a { static foo() { return one + 6; } }
103 { 102 {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 302 }
304 for (var j = 0; j < 10; j++) { 303 for (var j = 0; j < 10; j++) {
305 y = j + 10; 304 y = j + 10;
306 assertEquals(j, let_accessors[j]()); 305 assertEquals(j, let_accessors[j]());
307 assertEquals(y, var_accessors[j]()); 306 assertEquals(y, var_accessors[j]());
308 assertEquals(j, const_accessors[j]()); 307 assertEquals(j, const_accessors[j]());
309 assertEquals(j, class_accessors[j]().foo()); 308 assertEquals(j, class_accessors[j]().foo());
310 } 309 }
311 } 310 }
312 f8(); 311 f8();
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/harmony/block-scoping-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698