Index: test/cctest/interpreter/test-bytecode-generator.cc |
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc |
index 4177e07dc28697ef27aff8b72e260384f69828e2..3d7c6d38ef7dabf613af6e66058d5c4b2e596d3f 100644 |
--- a/test/cctest/interpreter/test-bytecode-generator.cc |
+++ b/test/cctest/interpreter/test-bytecode-generator.cc |
@@ -5186,16 +5186,28 @@ TEST(NewTarget) { |
InitializedHandleScope handle_scope; |
BytecodeGeneratorHelper helper; |
+ int new_target = Register::new_target().index(); |
+ |
ExpectedSnippet<int> snippets[] = { |
{"return new.target;", |
1 * kPointerSize, |
1, |
- 8, |
+ 5, |
+ { |
+ B(Ldar), R(new_target), // |
+ B(Star), R(0), // |
+ B(Return), // |
+ }}, |
+ {"new.target;", |
+ 1 * kPointerSize, |
+ 1, |
+ 6, |
{ |
- B(CallRuntime), U16(Runtime::kGetNewTarget), R(0), U8(0), // |
- B(Star), R(0), // |
- B(Return), // |
- }} |
+ B(Ldar), R(new_target), // |
+ B(Star), R(0), // |
+ B(LdaUndefined), // |
+ B(Return), // |
+ }}, |
}; |
for (size_t i = 0; i < arraysize(snippets); i++) { |