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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1572333002: [Interpreter] Add StackCheck node to BytecodeGraphBuilder graphs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix skip Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index a64f1fb509fe39a186044d82a582d5158eaea1dd..e3d8b6247bb04c55a0be5c0d60590a168abef48c 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -508,6 +508,12 @@ bool BytecodeGraphBuilder::CreateGraph(bool stack_check) {
void BytecodeGraphBuilder::CreateGraphBody(bool stack_check) {
// TODO(oth): Review ast-graph-builder equivalent, i.e. arguments
// object setup, this function variable if used, tracing hooks.
+
+ if (stack_check) {
+ Node* node = NewNode(javascript()->StackCheck());
+ PrepareEntryFrameState(node);
+ }
+
VisitBytecodes();
}
@@ -1863,6 +1869,16 @@ Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) {
}
+void BytecodeGraphBuilder::PrepareEntryFrameState(Node* node) {
+ DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op()));
+ DCHECK_EQ(IrOpcode::kDead,
+ NodeProperties::GetFrameStateInput(node, 0)->opcode());
+ NodeProperties::ReplaceFrameStateInput(
+ node, 0, environment()->Checkpoint(BailoutId(0),
+ OutputFrameStateCombine::Ignore()));
+}
+
+
Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count,
Node** value_inputs, bool incomplete) {
DCHECK_EQ(op->ValueInputCount(), value_input_count);
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698