| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 } | 1279 } |
| 1280 | 1280 |
| 1281 | 1281 |
| 1282 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { | 1282 void AstGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
| 1283 // Exception handling is supported only by going through Ignition first. | 1283 // Exception handling is supported only by going through Ignition first. |
| 1284 UNREACHABLE(); | 1284 UNREACHABLE(); |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 | 1287 |
| 1288 void AstGraphBuilder::VisitDebuggerStatement(DebuggerStatement* stmt) { | 1288 void AstGraphBuilder::VisitDebuggerStatement(DebuggerStatement* stmt) { |
| 1289 // Debugger statement is supported only by going through Ignition first. | 1289 Node* node = NewNode(javascript()->Debugger()); |
| 1290 UNREACHABLE(); | 1290 PrepareFrameState(node, stmt->DebugBreakId()); |
| 1291 environment()->MarkAllLocalsLive(); |
| 1291 } | 1292 } |
| 1292 | 1293 |
| 1293 | 1294 |
| 1294 void AstGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) { | 1295 void AstGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) { |
| 1295 // Find or build a shared function info. | 1296 // Find or build a shared function info. |
| 1296 Handle<SharedFunctionInfo> shared_info = | 1297 Handle<SharedFunctionInfo> shared_info = |
| 1297 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); | 1298 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); |
| 1298 CHECK(!shared_info.is_null()); // TODO(mstarzinger): Set stack overflow? | 1299 CHECK(!shared_info.is_null()); // TODO(mstarzinger): Set stack overflow? |
| 1299 | 1300 |
| 1300 // Create node to instantiate a new closure. | 1301 // Create node to instantiate a new closure. |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3309 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, | 3310 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, |
| 3310 SourcePositionTable* source_positions, int inlining_id) | 3311 SourcePositionTable* source_positions, int inlining_id) |
| 3311 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, | 3312 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, |
| 3312 loop_assignment), | 3313 loop_assignment), |
| 3313 source_positions_(source_positions), | 3314 source_positions_(source_positions), |
| 3314 start_position_(info->shared_info()->start_position(), inlining_id) {} | 3315 start_position_(info->shared_info()->start_position(), inlining_id) {} |
| 3315 | 3316 |
| 3316 } // namespace compiler | 3317 } // namespace compiler |
| 3317 } // namespace internal | 3318 } // namespace internal |
| 3318 } // namespace v8 | 3319 } // namespace v8 |
| OLD | NEW |