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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 | 2480 |
2481 void AstGraphBuilder::VisitIfNotNull(Statement* stmt) { | 2481 void AstGraphBuilder::VisitIfNotNull(Statement* stmt) { |
2482 if (stmt == NULL) return; | 2482 if (stmt == NULL) return; |
2483 Visit(stmt); | 2483 Visit(stmt); |
2484 } | 2484 } |
2485 | 2485 |
2486 | 2486 |
2487 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt, | 2487 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt, |
2488 LoopBuilder* loop) { | 2488 LoopBuilder* loop) { |
2489 ControlScopeForIteration scope(this, stmt, loop); | 2489 ControlScopeForIteration scope(this, stmt, loop); |
| 2490 // TODO(mstarzinger): For now we only allow to interrupt non-asm.js code, |
| 2491 // which is a gigantic hack and should be extended to all code at some point. |
| 2492 if (!info()->shared_info()->asm_function()) { |
| 2493 Node* node = NewNode(javascript()->StackCheck()); |
| 2494 PrepareFrameState(node, stmt->StackCheckId()); |
| 2495 } |
2490 Visit(stmt->body()); | 2496 Visit(stmt->body()); |
2491 } | 2497 } |
2492 | 2498 |
2493 | 2499 |
2494 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) { | 2500 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) { |
2495 Node* value; | 2501 Node* value; |
2496 if (expr->expression()->IsVariableProxy()) { | 2502 if (expr->expression()->IsVariableProxy()) { |
2497 // Delete of an unqualified identifier is only allowed in classic mode but | 2503 // Delete of an unqualified identifier is only allowed in classic mode but |
2498 // deleting "this" is allowed in all language modes. | 2504 // deleting "this" is allowed in all language modes. |
2499 Variable* variable = expr->expression()->AsVariableProxy()->var(); | 2505 Variable* variable = expr->expression()->AsVariableProxy()->var(); |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 // Phi does not exist yet, introduce one. | 3554 // Phi does not exist yet, introduce one. |
3549 value = NewPhi(inputs, value, control); | 3555 value = NewPhi(inputs, value, control); |
3550 value->ReplaceInput(inputs - 1, other); | 3556 value->ReplaceInput(inputs - 1, other); |
3551 } | 3557 } |
3552 return value; | 3558 return value; |
3553 } | 3559 } |
3554 | 3560 |
3555 } // namespace compiler | 3561 } // namespace compiler |
3556 } // namespace internal | 3562 } // namespace internal |
3557 } // namespace v8 | 3563 } // namespace v8 |
OLD | NEW |