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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1419273008: [Interpreter] Add support for new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_thisfunc
Patch Set: 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 | « no previous file | test/cctest/interpreter/test-bytecode-generator.cc » ('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 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 this_function_var.
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 // TODO(rmcilroy): Remove once we have tests which exercise this code path.
2054 UNIMPLEMENTED();
2055
2056 // Store the closure we were called with in the this_function_var. 2053 // Store the closure we were called with in the this_function_var.
2057 builder()->CallRuntime(Runtime::kGetOriginalConstructor, Register(), 0); 2054 builder()->CallRuntime(Runtime::kGetOriginalConstructor, Register(), 0);
2058 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid()); 2055 VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid());
2059 } 2056 }
2060 2057
2061 2058
2062 void BytecodeGenerator::VisitFunctionClosureForContext() { 2059 void BytecodeGenerator::VisitFunctionClosureForContext() {
2063 AccumulatorResultScope accumulator_execution_result(this); 2060 AccumulatorResultScope accumulator_execution_result(this);
2064 Scope* closure_scope = execution_context()->scope()->ClosureScope(); 2061 Scope* closure_scope = execution_context()->scope()->ClosureScope();
2065 if (closure_scope->is_script_scope() || 2062 if (closure_scope->is_script_scope() ||
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 } 2160 }
2164 2161
2165 2162
2166 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2163 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2167 return info()->feedback_vector()->GetIndex(slot); 2164 return info()->feedback_vector()->GetIndex(slot);
2168 } 2165 }
2169 2166
2170 } // namespace interpreter 2167 } // namespace interpreter
2171 } // namespace internal 2168 } // namespace internal
2172 } // namespace v8 2169 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698