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