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

Unified Diff: src/compiler/js-native-context-specialization.cc

Issue 2485563002: [turbofan] Properly rename receiver on CheckHeapObject. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-native-context-specialization.h ('k') | test/mjsunit/regress/regress-crbug-662410.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index e6f4194cfeb5173a767ec7b21d5d48b738a9d56b..d95b2101789f4781899e9441c32513d8712417a2 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -161,7 +161,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
receiver, effect, control);
} else {
// Monomorphic property access.
- effect = BuildCheckHeapObject(receiver, effect, control);
+ receiver = effect = graph()->NewNode(simplified()->CheckHeapObject(),
+ receiver, effect, control);
effect = BuildCheckMaps(receiver, effect, control,
access_info.receiver_maps());
}
@@ -199,7 +200,8 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
receiverissmi_control = graph()->NewNode(common()->IfTrue(), branch);
receiverissmi_effect = effect;
} else {
- effect = BuildCheckHeapObject(receiver, effect, control);
+ receiver = effect = graph()->NewNode(simplified()->CheckHeapObject(),
+ receiver, effect, control);
}
// Load the {receiver} map. The resulting effect is the dominating effect
@@ -507,7 +509,8 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
}
// Ensure that {receiver} is a heap object.
- effect = BuildCheckHeapObject(receiver, effect, control);
+ receiver = effect = graph()->NewNode(simplified()->CheckHeapObject(),
+ receiver, effect, control);
// Check for the monomorphic case.
if (access_infos.size() == 1) {
@@ -1449,33 +1452,6 @@ Node* JSNativeContextSpecialization::BuildCheckMaps(
inputs);
}
-Node* JSNativeContextSpecialization::BuildCheckHeapObject(Node* receiver,
- Node* effect,
- Node* control) {
- switch (receiver->opcode()) {
- case IrOpcode::kHeapConstant:
- case IrOpcode::kJSCreate:
- case IrOpcode::kJSCreateArguments:
- case IrOpcode::kJSCreateArray:
- case IrOpcode::kJSCreateClosure:
- case IrOpcode::kJSCreateIterResultObject:
- case IrOpcode::kJSCreateLiteralArray:
- case IrOpcode::kJSCreateLiteralObject:
- case IrOpcode::kJSCreateLiteralRegExp:
- case IrOpcode::kJSConvertReceiver:
- case IrOpcode::kJSToName:
- case IrOpcode::kJSToString:
- case IrOpcode::kJSToObject:
- case IrOpcode::kJSTypeOf: {
- return effect;
- }
- default: {
- return graph()->NewNode(simplified()->CheckHeapObject(), receiver, effect,
- control);
- }
- }
-}
-
void JSNativeContextSpecialization::AssumePrototypesStable(
std::vector<Handle<Map>> const& receiver_maps, Handle<JSObject> holder) {
// Determine actual holder and perform prototype chain checks.
« no previous file with comments | « src/compiler/js-native-context-specialization.h ('k') | test/mjsunit/regress/regress-crbug-662410.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698