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 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2921 void AstGraphBuilder::VisitInScope(Statement* stmt, Scope* s, Node* context) { | 2921 void AstGraphBuilder::VisitInScope(Statement* stmt, Scope* s, Node* context) { |
2922 ContextScope scope(this, s, context); | 2922 ContextScope scope(this, s, context); |
2923 DCHECK(s->declarations()->is_empty()); | 2923 DCHECK(s->declarations()->is_empty()); |
2924 Visit(stmt); | 2924 Visit(stmt); |
2925 } | 2925 } |
2926 | 2926 |
2927 | 2927 |
2928 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt, | 2928 void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt, |
2929 LoopBuilder* loop) { | 2929 LoopBuilder* loop) { |
2930 ControlScopeForIteration scope(this, stmt, loop); | 2930 ControlScopeForIteration scope(this, stmt, loop); |
2931 // TODO(mstarzinger): For now we only allow to interrupt non-asm.js code, | 2931 if (FLAG_turbo_loop_stackcheck) { |
2932 // which is a gigantic hack and should be extended to all code at some point. | |
2933 if (!info()->shared_info()->asm_function()) { | |
2934 Node* node = NewNode(javascript()->StackCheck()); | 2932 Node* node = NewNode(javascript()->StackCheck()); |
2935 PrepareFrameState(node, stmt->StackCheckId()); | 2933 PrepareFrameState(node, stmt->StackCheckId()); |
2936 } | 2934 } |
2937 Visit(stmt->body()); | 2935 Visit(stmt->body()); |
2938 } | 2936 } |
2939 | 2937 |
2940 | 2938 |
2941 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) { | 2939 void AstGraphBuilder::VisitDelete(UnaryOperation* expr) { |
2942 Node* value; | 2940 Node* value; |
2943 if (expr->expression()->IsVariableProxy()) { | 2941 if (expr->expression()->IsVariableProxy()) { |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4302 // Phi does not exist yet, introduce one. | 4300 // Phi does not exist yet, introduce one. |
4303 value = NewPhi(inputs, value, control); | 4301 value = NewPhi(inputs, value, control); |
4304 value->ReplaceInput(inputs - 1, other); | 4302 value->ReplaceInput(inputs - 1, other); |
4305 } | 4303 } |
4306 return value; | 4304 return value; |
4307 } | 4305 } |
4308 | 4306 |
4309 } // namespace compiler | 4307 } // namespace compiler |
4310 } // namespace internal | 4308 } // namespace internal |
4311 } // namespace v8 | 4309 } // namespace v8 |
OLD | NEW |