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/load-elimination.cc

Issue 2191823002: [turbofan] Refactor the lowering of element/property accesses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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-native-context-specialization.cc ('k') | src/field-index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/load-elimination.cc
diff --git a/src/compiler/load-elimination.cc b/src/compiler/load-elimination.cc
index c5a4290c04c63d047fd09eafaf496c0c680a86f1..d326ed179b06eeca57e51ab36f512ec4fa1bf405 100644
--- a/src/compiler/load-elimination.cc
+++ b/src/compiler/load-elimination.cc
@@ -312,10 +312,10 @@ Reduction LoadElimination::ReduceLoadField(Node* node) {
if (Node* const replacement = state->LookupField(object, field_index)) {
// Make sure the {replacement} has at least as good type
// as the original {node}.
- if (NodeProperties::GetType(replacement)
+ if (!replacement->IsDead() &&
+ NodeProperties::GetType(replacement)
->Is(NodeProperties::GetType(node))) {
ReplaceWithValue(node, replacement, effect);
- DCHECK(!replacement->IsDead());
return Replace(replacement);
}
}
@@ -357,10 +357,10 @@ Reduction LoadElimination::ReduceLoadElement(Node* node) {
if (Node* const replacement = state->LookupElement(object, index)) {
// Make sure the {replacement} has at least as good type
// as the original {node}.
- if (NodeProperties::GetType(replacement)
+ if (!replacement->IsDead() &&
+ NodeProperties::GetType(replacement)
->Is(NodeProperties::GetType(node))) {
ReplaceWithValue(node, replacement, effect);
- DCHECK(!replacement->IsDead());
return Replace(replacement);
}
}
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/field-index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698