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

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

Issue 2388303006: Reland of "[turbofan] Osr value typing + dynamic type checks on entry. (patchset #5 id:80001 of htt… (Closed)
Patch Set: Tweaks Created 4 years, 2 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/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('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 d26ff93e3f2373fb4d230e0950f36b5bd4ff9b2d..0195f94030500c9806e5f3752a1307641d6f9f00 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -438,6 +438,24 @@ void BytecodeGraphBuilder::Environment::PrepareForOsrEntry() {
if (i >= accumulator_base()) idx = Linkage::kOsrAccumulatorRegisterIndex;
values()->at(i) = graph()->NewNode(common()->OsrValue(idx), entry);
}
+
+ BailoutId loop_id(builder_->bytecode_iterator().current_offset());
+ Node* frame_state =
+ Checkpoint(loop_id, OutputFrameStateCombine::Ignore(), false);
+ Node* checkpoint =
+ graph()->NewNode(common()->Checkpoint(), frame_state, entry, entry);
+ UpdateEffectDependency(checkpoint);
+
+ // Create the OSR guard nodes.
+ const Operator* guard_op = common()->OsrGuard(OsrGuardType::kUninitialized);
+ Node* effect = checkpoint;
+ for (int i = 0; i < size; i++) {
+ values()->at(i) = effect =
+ graph()->NewNode(guard_op, values()->at(i), effect, entry);
+ }
+ Node* context = effect = graph()->NewNode(guard_op, Context(), effect, entry);
+ SetContext(context);
+ UpdateEffectDependency(effect);
}
bool BytecodeGraphBuilder::Environment::StateValuesRequireUpdate(
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/common-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698