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

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1442643002: [turbofan] Rename "original constructor" to "new target". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. 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 | « src/runtime/runtime-function.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 // TODO(rmcilroy): Remove this define after this flag is turned on globally 5 // TODO(rmcilroy): Remove this define after this flag is turned on globally
6 #define V8_IMMINENT_DEPRECATION_WARNINGS 6 #define V8_IMMINENT_DEPRECATION_WARNINGS
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 5181 matching lines...) Expand 10 before | Expand all | Expand 10 after
5192 TEST(NewTarget) { 5192 TEST(NewTarget) {
5193 InitializedHandleScope handle_scope; 5193 InitializedHandleScope handle_scope;
5194 BytecodeGeneratorHelper helper; 5194 BytecodeGeneratorHelper helper;
5195 5195
5196 ExpectedSnippet<int> snippets[] = { 5196 ExpectedSnippet<int> snippets[] = {
5197 {"return new.target;", 5197 {"return new.target;",
5198 1 * kPointerSize, 5198 1 * kPointerSize,
5199 1, 5199 1,
5200 10, 5200 10,
5201 { 5201 {
5202 B(CallRuntime), U16(Runtime::kGetOriginalConstructor), R(0), // 5202 B(CallRuntime), U16(Runtime::kGetNewTarget), R(0), U8(0), //
5203 U8(0), // 5203 B(Star), R(0), //
5204 B(Star), R(0), // 5204 B(Ldar), R(0), //
5205 B(Ldar), R(0), // 5205 B(Return), //
5206 B(Return), //
5207 }}, 5206 }},
5208 }; 5207 };
5209 5208
5210 for (size_t i = 0; i < arraysize(snippets); i++) { 5209 for (size_t i = 0; i < arraysize(snippets); i++) {
5211 Handle<BytecodeArray> bytecode_array = 5210 Handle<BytecodeArray> bytecode_array =
5212 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 5211 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
5213 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 5212 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
5214 } 5213 }
5215 } 5214 }
5216 5215
5217 } // namespace interpreter 5216 } // namespace interpreter
5218 } // namespace internal 5217 } // namespace internal
5219 } // namespace v8 5218 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698