Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1065923002: [turbofan] Add JSStackCheck into loop bodies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-toplevel
Patch Set: Rebased. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698