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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2365223003: Revert of [compiler] Properly guard the speculative optimizations for instanceof. (Closed)
Patch Set: Created 4 years, 3 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/verifier.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 00b667376a8247460526087fec984c12156e0349..e6c913486ae24361859b3f1e5322fcfaefcb94a4 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -11416,23 +11416,15 @@
function->native_context()->closure() &&
!function->map()->has_non_instance_prototype() &&
isolate()->IsHasInstanceLookupChainIntact()) {
- // Make sure the feedback for the instanceof is still fast (i.e. the
- // vector slot is still unintialized).
- Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate());
- Handle<Object> feedback(
- vector->Get(expr->CompareOperationFeedbackSlot()), isolate());
- if (feedback.is_identical_to(
- TypeFeedbackVector::UninitializedSentinel(isolate()))) {
- Handle<Map> initial_map(function->initial_map(), isolate());
- top_info()->dependencies()->AssumeInitialMapCantChange(initial_map);
- top_info()->dependencies()->AssumePropertyCell(
- isolate()->factory()->has_instance_protector());
- HInstruction* prototype =
- Add<HConstant>(handle(initial_map->prototype(), isolate()));
- HHasInPrototypeChainAndBranch* result =
- New<HHasInPrototypeChainAndBranch>(left, prototype);
- return ast_context()->ReturnControl(result, expr->id());
- }
+ Handle<Map> initial_map(function->initial_map(), isolate());
+ top_info()->dependencies()->AssumeInitialMapCantChange(initial_map);
+ top_info()->dependencies()->AssumePropertyCell(
+ isolate()->factory()->has_instance_protector());
+ HInstruction* prototype =
+ Add<HConstant>(handle(initial_map->prototype(), isolate()));
+ HHasInPrototypeChainAndBranch* result =
+ New<HHasInPrototypeChainAndBranch>(left, prototype);
+ return ast_context()->ReturnControl(result, expr->id());
}
}
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698