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

Side by Side Diff: src/interpreter/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/full-codegen/x87/full-codegen-x87.cc ('k') | src/runtime/runtime.h » ('j') | 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 #include "src/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/control-flow-builders.h" 8 #include "src/interpreter/control-flow-builders.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/parser.h" 10 #include "src/parser.h"
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid()); 2034 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid());
2035 } 2035 }
2036 2036
2037 2037
2038 void BytecodeGenerator::VisitThisFunctionVariable(Variable* variable) { 2038 void BytecodeGenerator::VisitThisFunctionVariable(Variable* variable) {
2039 if (variable == nullptr) return; 2039 if (variable == nullptr) return;
2040 2040
2041 // TODO(rmcilroy): Remove once we have tests which exercise this code path. 2041 // TODO(rmcilroy): Remove once we have tests which exercise this code path.
2042 UNIMPLEMENTED(); 2042 UNIMPLEMENTED();
2043 2043
2044 // Store the closure we were called with in the this_function_var. 2044 // Store the closure we were called with in the given variable.
2045 builder()->LoadAccumulatorWithRegister(Register::function_closure()); 2045 builder()->LoadAccumulatorWithRegister(Register::function_closure());
2046 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid()); 2046 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid());
2047 } 2047 }
2048 2048
2049 2049
2050 void BytecodeGenerator::VisitNewTargetVariable(Variable* variable) { 2050 void BytecodeGenerator::VisitNewTargetVariable(Variable* variable) {
2051 if (variable == nullptr) return; 2051 if (variable == nullptr) return;
2052 2052
2053 // Store the closure we were called with in the this_function_var. 2053 // Store the new target we were called with in the given variable.
2054 builder()->CallRuntime(Runtime::kGetOriginalConstructor, Register(), 0); 2054 builder()->CallRuntime(Runtime::kGetNewTarget, Register(), 0);
2055 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid()); 2055 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid());
2056 } 2056 }
2057 2057
2058 2058
2059 void BytecodeGenerator::VisitFunctionClosureForContext() { 2059 void BytecodeGenerator::VisitFunctionClosureForContext() {
2060 AccumulatorResultScope accumulator_execution_result(this); 2060 AccumulatorResultScope accumulator_execution_result(this);
2061 Scope* closure_scope = execution_context()->scope()->ClosureScope(); 2061 Scope* closure_scope = execution_context()->scope()->ClosureScope();
2062 if (closure_scope->is_script_scope() || 2062 if (closure_scope->is_script_scope() ||
2063 closure_scope->is_module_scope()) { 2063 closure_scope->is_module_scope()) {
2064 // Contexts nested in the native context have a canonical empty function as 2064 // Contexts nested in the native context have a canonical empty function as
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2160 }
2161 2161
2162 2162
2163 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2163 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2164 return info()->feedback_vector()->GetIndex(slot); 2164 return info()->feedback_vector()->GetIndex(slot);
2165 } 2165 }
2166 2166
2167 } // namespace interpreter 2167 } // namespace interpreter
2168 } // namespace internal 2168 } // namespace internal
2169 } // namespace v8 2169 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698