| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/interpreter/control-flow-builders.h" | 9 #include "src/interpreter/control-flow-builders.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 BytecodeLabel end_label; | 2029 BytecodeLabel end_label; |
| 2030 VisitForAccumulatorValue(left); | 2030 VisitForAccumulatorValue(left); |
| 2031 builder()->JumpIfFalse(&end_label); | 2031 builder()->JumpIfFalse(&end_label); |
| 2032 VisitForAccumulatorValue(right); | 2032 VisitForAccumulatorValue(right); |
| 2033 builder()->Bind(&end_label); | 2033 builder()->Bind(&end_label); |
| 2034 } | 2034 } |
| 2035 execution_result()->SetResultInAccumulator(); | 2035 execution_result()->SetResultInAccumulator(); |
| 2036 } | 2036 } |
| 2037 | 2037 |
| 2038 | 2038 |
| 2039 void BytecodeGenerator::VisitRewritableAssignmentExpression( |
| 2040 RewritableAssignmentExpression* expr) { |
| 2041 Visit(expr->expression()); |
| 2042 } |
| 2043 |
| 2044 |
| 2039 void BytecodeGenerator::VisitNewLocalFunctionContext() { | 2045 void BytecodeGenerator::VisitNewLocalFunctionContext() { |
| 2040 AccumulatorResultScope accumulator_execution_result(this); | 2046 AccumulatorResultScope accumulator_execution_result(this); |
| 2041 Scope* scope = this->scope(); | 2047 Scope* scope = this->scope(); |
| 2042 | 2048 |
| 2043 // Allocate a new local context. | 2049 // Allocate a new local context. |
| 2044 if (scope->is_script_scope()) { | 2050 if (scope->is_script_scope()) { |
| 2045 TemporaryRegisterScope temporary_register_scope(builder()); | 2051 TemporaryRegisterScope temporary_register_scope(builder()); |
| 2046 Register closure = temporary_register_scope.NewRegister(); | 2052 Register closure = temporary_register_scope.NewRegister(); |
| 2047 Register scope_info = temporary_register_scope.NewRegister(); | 2053 Register scope_info = temporary_register_scope.NewRegister(); |
| 2048 DCHECK(Register::AreContiguous(closure, scope_info)); | 2054 DCHECK(Register::AreContiguous(closure, scope_info)); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 } | 2238 } |
| 2233 | 2239 |
| 2234 | 2240 |
| 2235 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 2241 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 2236 return info()->feedback_vector()->GetIndex(slot); | 2242 return info()->feedback_vector()->GetIndex(slot); |
| 2237 } | 2243 } |
| 2238 | 2244 |
| 2239 } // namespace interpreter | 2245 } // namespace interpreter |
| 2240 } // namespace internal | 2246 } // namespace internal |
| 2241 } // namespace v8 | 2247 } // namespace v8 |
| OLD | NEW |