| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |