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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1419823003: Remove support for "loads and stores to global vars through property cell shortcuts inst… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@disable-shortcuts
Patch Set: Addressing comments 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 unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.cc ('k') | no next file » | 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 25 matching lines...) Expand all
36 .LoadUndefined() 36 .LoadUndefined()
37 .LoadNull() 37 .LoadNull()
38 .LoadTheHole() 38 .LoadTheHole()
39 .LoadTrue() 39 .LoadTrue()
40 .LoadFalse(); 40 .LoadFalse();
41 41
42 // Emit accumulator transfers. 42 // Emit accumulator transfers.
43 Register reg(0); 43 Register reg(0);
44 builder.LoadAccumulatorWithRegister(reg).StoreAccumulatorInRegister(reg); 44 builder.LoadAccumulatorWithRegister(reg).StoreAccumulatorInRegister(reg);
45 45
46 // Emit global load / store operations.
47 builder.LoadGlobal(1)
48 .StoreGlobal(1, LanguageMode::SLOPPY)
49 .StoreGlobal(1, LanguageMode::STRICT);
50
51 // Emit context operations. 46 // Emit context operations.
52 builder.PushContext(reg); 47 builder.PushContext(reg);
53 builder.PopContext(reg); 48 builder.PopContext(reg);
54 builder.LoadContextSlot(reg, 1); 49 builder.LoadContextSlot(reg, 1);
55 builder.StoreContextSlot(reg, 1); 50 builder.StoreContextSlot(reg, 1);
56 51
57 // Emit load / store property operations. 52 // Emit load / store property operations.
58 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY) 53 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY)
59 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY) 54 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY)
60 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY) 55 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY)
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 522
528 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 523 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
529 iterator.Advance(); 524 iterator.Advance();
530 CHECK(iterator.done()); 525 CHECK(iterator.done());
531 } 526 }
532 527
533 528
534 } // namespace interpreter 529 } // namespace interpreter
535 } // namespace internal 530 } // namespace internal
536 } // namespace v8 531 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698