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

Unified Diff: src/compiler/simplified-lowering.cc

Issue 2390823011: [turbofan] HeapConstant types should compare by handle address (Closed)
Patch Set: HeapConstantType holds a HeapObject. 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 | « no previous file | src/compiler/typed-optimization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 379d9ac8a1022f45ec2684c1306e4dcd491599bb..491aed6b6bf0cda71d1fb16c09d135e900ad7fef 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1031,10 +1031,8 @@ class RepresentationSelector {
// undefined, because these special oddballs are always in the root set.
return kNoWriteBarrier;
}
- if (value_type->IsHeapConstant() &&
- value_type->AsHeapConstant()->Value()->IsHeapObject()) {
- Handle<HeapObject> value_object =
- Handle<HeapObject>::cast(value_type->AsHeapConstant()->Value());
+ if (value_type->IsHeapConstant()) {
+ Handle<HeapObject> value_object = value_type->AsHeapConstant()->Value();
RootIndexMap root_index_map(jsgraph_->isolate());
int root_index = root_index_map.Lookup(*value_object);
if (root_index != RootIndexMap::kInvalidRootIndex &&
« no previous file with comments | « no previous file | src/compiler/typed-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698