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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1201 |
1202 // Pending message object is restored on exit. | 1202 // Pending message object is restored on exit. |
1203 builder()->CallRuntime(Runtime::kInterpreterSetPendingMessage, message, 1); | 1203 builder()->CallRuntime(Runtime::kInterpreterSetPendingMessage, message, 1); |
1204 | 1204 |
1205 // Dynamic dispatch after the finally-block. | 1205 // Dynamic dispatch after the finally-block. |
1206 commands.ApplyDeferredCommands(); | 1206 commands.ApplyDeferredCommands(); |
1207 } | 1207 } |
1208 | 1208 |
1209 | 1209 |
1210 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { | 1210 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { |
1211 UNIMPLEMENTED(); | 1211 builder()->Debugger(); |
1212 } | 1212 } |
1213 | 1213 |
1214 | 1214 |
1215 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { | 1215 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { |
1216 // Find or build a shared function info. | 1216 // Find or build a shared function info. |
1217 Handle<SharedFunctionInfo> shared_info = | 1217 Handle<SharedFunctionInfo> shared_info = |
1218 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); | 1218 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); |
1219 CHECK(!shared_info.is_null()); // TODO(rmcilroy): Set stack overflow? | 1219 CHECK(!shared_info.is_null()); // TODO(rmcilroy): Set stack overflow? |
1220 builder()->CreateClosure(shared_info, | 1220 builder()->CreateClosure(shared_info, |
1221 expr->pretenure() ? TENURED : NOT_TENURED); | 1221 expr->pretenure() ? TENURED : NOT_TENURED); |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2541 } | 2541 } |
2542 | 2542 |
2543 | 2543 |
2544 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 2544 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
2545 return info()->feedback_vector()->GetIndex(slot); | 2545 return info()->feedback_vector()->GetIndex(slot); |
2546 } | 2546 } |
2547 | 2547 |
2548 } // namespace interpreter | 2548 } // namespace interpreter |
2549 } // namespace internal | 2549 } // namespace internal |
2550 } // namespace v8 | 2550 } // namespace v8 |
OLD | NEW |