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

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

Issue 1666943003: [interpreter] Support for ES6 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Register wide(128); 48 Register wide(128);
49 49
50 builder.LoadAccumulatorWithRegister(reg) 50 builder.LoadAccumulatorWithRegister(reg)
51 .LoadNull() 51 .LoadNull()
52 .StoreAccumulatorInRegister(reg); 52 .StoreAccumulatorInRegister(reg);
53 53
54 // Emit register-register transfer. 54 // Emit register-register transfer.
55 builder.MoveRegister(reg, other); 55 builder.MoveRegister(reg, other);
56 builder.MoveRegister(reg, wide); 56 builder.MoveRegister(reg, wide);
57 57
58 // Prototype info for classes.
59 builder.LoadPrototypeOrInitialMap();
60
58 // Emit global load / store operations. 61 // Emit global load / store operations.
59 Factory* factory = isolate()->factory(); 62 Factory* factory = isolate()->factory();
60 Handle<String> name = factory->NewStringFromStaticChars("var_name"); 63 Handle<String> name = factory->NewStringFromStaticChars("var_name");
61 builder.LoadGlobal(name, 1, LanguageMode::SLOPPY, 64 builder.LoadGlobal(name, 1, LanguageMode::SLOPPY,
62 TypeofMode::NOT_INSIDE_TYPEOF) 65 TypeofMode::NOT_INSIDE_TYPEOF)
63 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF) 66 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF)
64 .LoadGlobal(name, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF) 67 .LoadGlobal(name, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF)
65 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF) 68 .LoadGlobal(name, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF)
66 .StoreGlobal(name, 1, LanguageMode::SLOPPY) 69 .StoreGlobal(name, 1, LanguageMode::SLOPPY)
67 .StoreGlobal(name, 1, LanguageMode::STRICT); 70 .StoreGlobal(name, 1, LanguageMode::STRICT);
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 iterator.Advance(); 654 iterator.Advance();
652 } 655 }
653 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 656 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
654 iterator.Advance(); 657 iterator.Advance();
655 CHECK(iterator.done()); 658 CHECK(iterator.done());
656 } 659 }
657 660
658 } // namespace interpreter 661 } // namespace interpreter
659 } // namespace internal 662 } // namespace internal
660 } // namespace v8 663 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698