| 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 <stack> | 7 #include <stack> |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/interpreter/control-flow-builders.h" | 10 #include "src/interpreter/control-flow-builders.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ControlScope* current = this; | 125 ControlScope* current = this; |
| 126 do { | 126 do { |
| 127 if (current->Execute(command, statement)) return; | 127 if (current->Execute(command, statement)) return; |
| 128 current = current->outer(); | 128 current = current->outer(); |
| 129 } while (current != nullptr); | 129 } while (current != nullptr); |
| 130 UNREACHABLE(); | 130 UNREACHABLE(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 | 133 |
| 134 BytecodeGenerator::BytecodeGenerator(Isolate* isolate, Zone* zone) | 134 BytecodeGenerator::BytecodeGenerator(Isolate* isolate, Zone* zone) |
| 135 : builder_(isolate, zone), | 135 : isolate_(isolate), |
| 136 builder_(isolate, zone), |
| 136 info_(nullptr), | 137 info_(nullptr), |
| 137 scope_(nullptr), | 138 scope_(nullptr), |
| 138 globals_(0, zone), | 139 globals_(0, zone), |
| 139 control_scope_(nullptr), | 140 control_scope_(nullptr), |
| 140 current_context_(Register::function_context()) { | 141 current_context_(Register::function_context()) { |
| 141 InitializeAstVisitor(isolate, zone); | 142 InitializeAstVisitor(isolate, zone); |
| 142 } | 143 } |
| 143 | 144 |
| 144 | 145 |
| 145 BytecodeGenerator::~BytecodeGenerator() {} | 146 BytecodeGenerator::~BytecodeGenerator() {} |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 } | 990 } |
| 990 | 991 |
| 991 | 992 |
| 992 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 993 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 993 return info()->feedback_vector()->GetIndex(slot); | 994 return info()->feedback_vector()->GetIndex(slot); |
| 994 } | 995 } |
| 995 | 996 |
| 996 } // namespace interpreter | 997 } // namespace interpreter |
| 997 } // namespace internal | 998 } // namespace internal |
| 998 } // namespace v8 | 999 } // namespace v8 |
| OLD | NEW |