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

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

Issue 1678103002: [interpreter] Remove special "prototype" load in class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
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 "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 Register wide(128); 47 Register wide(128);
48 48
49 builder.LoadAccumulatorWithRegister(reg) 49 builder.LoadAccumulatorWithRegister(reg)
50 .LoadNull() 50 .LoadNull()
51 .StoreAccumulatorInRegister(reg); 51 .StoreAccumulatorInRegister(reg);
52 52
53 // Emit register-register transfer. 53 // Emit register-register transfer.
54 builder.MoveRegister(reg, other); 54 builder.MoveRegister(reg, other);
55 builder.MoveRegister(reg, wide); 55 builder.MoveRegister(reg, wide);
56 56
57 // Prototype info for classes.
58 builder.LoadPrototypeOrInitialMap();
59
60 // Emit global load / store operations. 57 // Emit global load / store operations.
61 Factory* factory = isolate()->factory(); 58 Factory* factory = isolate()->factory();
62 Handle<String> name = factory->NewStringFromStaticChars("var_name"); 59 Handle<String> name = factory->NewStringFromStaticChars("var_name");
63 builder.LoadGlobal(name, 1, LanguageMode::SLOPPY, 60 builder.LoadGlobal(name, 1, LanguageMode::SLOPPY,
64 TypeofMode::NOT_INSIDE_TYPEOF) 61 TypeofMode::NOT_INSIDE_TYPEOF)
65 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF) 62 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF)
66 .LoadGlobal(name, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF) 63 .LoadGlobal(name, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF)
67 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF) 64 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF)
68 .StoreGlobal(name, 1, LanguageMode::SLOPPY) 65 .StoreGlobal(name, 1, LanguageMode::SLOPPY)
69 .StoreGlobal(name, 1, LanguageMode::STRICT); 66 .StoreGlobal(name, 1, LanguageMode::STRICT);
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 iterator.Advance(); 655 iterator.Advance();
659 } 656 }
660 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 657 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
661 iterator.Advance(); 658 iterator.Advance();
662 CHECK(iterator.done()); 659 CHECK(iterator.done());
663 } 660 }
664 661
665 } // namespace interpreter 662 } // namespace interpreter
666 } // namespace internal 663 } // namespace internal
667 } // namespace v8 664 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698