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