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

Unified Diff: src/compiler/js-frame-specialization.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/js-frame-specialization.h ('k') | src/compiler/node-properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-frame-specialization.cc
diff --git a/src/compiler/js-frame-specialization.cc b/src/compiler/js-frame-specialization.cc
index 769d615e4a4ddc5fba4d19f0b6152e1d1932df9f..55ec1bf41d255509bda30e481352396ffd10a164 100644
--- a/src/compiler/js-frame-specialization.cc
+++ b/src/compiler/js-frame-specialization.cc
@@ -16,6 +16,8 @@ Reduction JSFrameSpecialization::Reduce(Node* node) {
switch (node->opcode()) {
case IrOpcode::kOsrValue:
return ReduceOsrValue(node);
+ case IrOpcode::kOsrGuard:
+ return ReduceOsrGuard(node);
case IrOpcode::kParameter:
return ReduceParameter(node);
default:
@@ -24,11 +26,10 @@ Reduction JSFrameSpecialization::Reduce(Node* node) {
return NoChange();
}
-
Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) {
DCHECK_EQ(IrOpcode::kOsrValue, node->opcode());
Handle<Object> value;
- int const index = OpParameter<int>(node);
+ int index = OsrValueIndexOf(node->op());
int const parameters_count = frame()->ComputeParametersCount() + 1;
if (index == Linkage::kOsrContextSpillSlotIndex) {
value = handle(frame()->context(), isolate());
@@ -43,6 +44,12 @@ Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) {
return Replace(jsgraph()->Constant(value));
}
+Reduction JSFrameSpecialization::ReduceOsrGuard(Node* node) {
+ DCHECK_EQ(IrOpcode::kOsrGuard, node->opcode());
+ ReplaceWithValue(node, node->InputAt(0),
+ NodeProperties::GetEffectInput(node));
+ return Changed(node);
+}
Reduction JSFrameSpecialization::ReduceParameter(Node* node) {
DCHECK_EQ(IrOpcode::kParameter, node->opcode());
« no previous file with comments | « src/compiler/js-frame-specialization.h ('k') | src/compiler/node-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698