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 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2025 BytecodeLabel end_label; | 2025 BytecodeLabel end_label; |
2026 VisitForAccumulatorValue(left); | 2026 VisitForAccumulatorValue(left); |
2027 builder()->JumpIfFalse(&end_label); | 2027 builder()->JumpIfFalse(&end_label); |
2028 VisitForAccumulatorValue(right); | 2028 VisitForAccumulatorValue(right); |
2029 builder()->Bind(&end_label); | 2029 builder()->Bind(&end_label); |
2030 } | 2030 } |
2031 execution_result()->SetResultInAccumulator(); | 2031 execution_result()->SetResultInAccumulator(); |
2032 } | 2032 } |
2033 | 2033 |
2034 | 2034 |
| 2035 void BytecodeGenerator::VisitRewritableExpression(RewritableExpression* expr) { |
| 2036 Visit(expr->expression()); |
| 2037 } |
| 2038 |
| 2039 |
2035 void BytecodeGenerator::VisitNewLocalFunctionContext() { | 2040 void BytecodeGenerator::VisitNewLocalFunctionContext() { |
2036 AccumulatorResultScope accumulator_execution_result(this); | 2041 AccumulatorResultScope accumulator_execution_result(this); |
2037 Scope* scope = this->scope(); | 2042 Scope* scope = this->scope(); |
2038 | 2043 |
2039 // Allocate a new local context. | 2044 // Allocate a new local context. |
2040 if (scope->is_script_scope()) { | 2045 if (scope->is_script_scope()) { |
2041 TemporaryRegisterScope temporary_register_scope(builder()); | 2046 TemporaryRegisterScope temporary_register_scope(builder()); |
2042 Register closure = temporary_register_scope.NewRegister(); | 2047 Register closure = temporary_register_scope.NewRegister(); |
2043 Register scope_info = temporary_register_scope.NewRegister(); | 2048 Register scope_info = temporary_register_scope.NewRegister(); |
2044 DCHECK(Register::AreContiguous(closure, scope_info)); | 2049 DCHECK(Register::AreContiguous(closure, scope_info)); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 } | 2233 } |
2229 | 2234 |
2230 | 2235 |
2231 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 2236 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
2232 return info()->feedback_vector()->GetIndex(slot); | 2237 return info()->feedback_vector()->GetIndex(slot); |
2233 } | 2238 } |
2234 | 2239 |
2235 } // namespace interpreter | 2240 } // namespace interpreter |
2236 } // namespace internal | 2241 } // namespace internal |
2237 } // namespace v8 | 2242 } // namespace v8 |
OLD | NEW |