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

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

Issue 687473002: [turbofan] Turn slow case for stack check into deferred code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/control-builders.h » ('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/control-builders.h" 8 #include "src/compiler/control-builders.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 2106
2107 Node* AstGraphBuilder::BuildStackCheck() { 2107 Node* AstGraphBuilder::BuildStackCheck() {
2108 IfBuilder stack_check(this); 2108 IfBuilder stack_check(this);
2109 Node* limit = 2109 Node* limit =
2110 NewNode(jsgraph()->machine()->Load(kMachPtr), 2110 NewNode(jsgraph()->machine()->Load(kMachPtr),
2111 jsgraph()->ExternalConstant( 2111 jsgraph()->ExternalConstant(
2112 ExternalReference::address_of_stack_limit(isolate())), 2112 ExternalReference::address_of_stack_limit(isolate())),
2113 jsgraph()->ZeroConstant()); 2113 jsgraph()->ZeroConstant());
2114 Node* stack = NewNode(jsgraph()->machine()->LoadStackPointer()); 2114 Node* stack = NewNode(jsgraph()->machine()->LoadStackPointer());
2115 Node* tag = NewNode(jsgraph()->machine()->UintLessThan(), limit, stack); 2115 Node* tag = NewNode(jsgraph()->machine()->UintLessThan(), limit, stack);
2116 stack_check.If(tag); 2116 stack_check.If(tag, BranchHint::kTrue);
2117 stack_check.Then(); 2117 stack_check.Then();
2118 stack_check.Else(); 2118 stack_check.Else();
2119 Node* guard = NewNode(javascript()->CallRuntime(Runtime::kStackGuard, 0)); 2119 Node* guard = NewNode(javascript()->CallRuntime(Runtime::kStackGuard, 0));
2120 stack_check.End(); 2120 stack_check.End();
2121 return guard; 2121 return guard;
2122 } 2122 }
2123 2123
2124 2124
2125 void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id, 2125 void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id,
2126 OutputFrameStateCombine combine) { 2126 OutputFrameStateCombine combine) {
2127 if (OperatorProperties::HasFrameStateInput(node->op())) { 2127 if (OperatorProperties::HasFrameStateInput(node->op())) {
2128 DCHECK(NodeProperties::GetFrameStateInput(node)->opcode() == 2128 DCHECK(NodeProperties::GetFrameStateInput(node)->opcode() ==
2129 IrOpcode::kDead); 2129 IrOpcode::kDead);
2130 NodeProperties::ReplaceFrameStateInput( 2130 NodeProperties::ReplaceFrameStateInput(
2131 node, environment()->Checkpoint(ast_id, combine)); 2131 node, environment()->Checkpoint(ast_id, combine));
2132 } 2132 }
2133 } 2133 }
2134 2134
2135 } 2135 }
2136 } 2136 }
2137 } // namespace v8::internal::compiler 2137 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | src/compiler/control-builders.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698