| 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/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
| 10 #include "src/interpreter/control-flow-builders.h" | 10 #include "src/interpreter/control-flow-builders.h" |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } | 890 } |
| 891 | 891 |
| 892 | 892 |
| 893 void BytecodeGenerator::VisitBreakStatement(BreakStatement* stmt) { | 893 void BytecodeGenerator::VisitBreakStatement(BreakStatement* stmt) { |
| 894 execution_control()->Break(stmt->target()); | 894 execution_control()->Break(stmt->target()); |
| 895 } | 895 } |
| 896 | 896 |
| 897 | 897 |
| 898 void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { | 898 void BytecodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { |
| 899 VisitForAccumulatorValue(stmt->expression()); | 899 VisitForAccumulatorValue(stmt->expression()); |
| 900 builder()->SetReturnPosition(info_->literal()); | 900 builder()->SetStatementPosition(stmt); |
| 901 execution_control()->ReturnAccumulator(); | 901 execution_control()->ReturnAccumulator(); |
| 902 } | 902 } |
| 903 | 903 |
| 904 | 904 |
| 905 void BytecodeGenerator::VisitWithStatement(WithStatement* stmt) { | 905 void BytecodeGenerator::VisitWithStatement(WithStatement* stmt) { |
| 906 VisitForAccumulatorValue(stmt->expression()); | 906 VisitForAccumulatorValue(stmt->expression()); |
| 907 builder()->CastAccumulatorToJSObject(); | 907 builder()->CastAccumulatorToJSObject(); |
| 908 VisitNewLocalWithContext(); | 908 VisitNewLocalWithContext(); |
| 909 VisitInScope(stmt->statement(), stmt->scope()); | 909 VisitInScope(stmt->statement(), stmt->scope()); |
| 910 } | 910 } |
| (...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3112 } | 3112 } |
| 3113 | 3113 |
| 3114 | 3114 |
| 3115 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3115 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 3116 return info()->feedback_vector()->GetIndex(slot); | 3116 return info()->feedback_vector()->GetIndex(slot); |
| 3117 } | 3117 } |
| 3118 | 3118 |
| 3119 } // namespace interpreter | 3119 } // namespace interpreter |
| 3120 } // namespace internal | 3120 } // namespace internal |
| 3121 } // namespace v8 | 3121 } // namespace v8 |
| OLD | NEW |