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

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

Issue 2611523002: [Turbofan] Simplified lowering to be done concurrently. (Closed)
Patch Set: Constant fold on canonical handles. Created 3 years, 12 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/representation-change.cc ('k') | no next file » | 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 f38401b09c923175c9c7b45e910f19224e195da4..b1046eeda308711a7b4d20c154f620656148f00a 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1109,17 +1109,14 @@ class RepresentationSelector {
return kNoWriteBarrier;
}
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 &&
- jsgraph_->isolate()->heap()->RootIsImmortalImmovable(root_index)) {
- // Write barriers are unnecessary for immortal immovable roots.
- return kNoWriteBarrier;
- }
- if (value_object->IsMap()) {
- // Write barriers for storing maps are cheaper.
- return kMapWriteBarrier;
+ Heap::RootListIndex root_index;
+ Heap* heap = jsgraph_->isolate()->heap();
+ if (heap->IsRootHandle(value_type->AsHeapConstant()->Value(),
+ &root_index)) {
+ if (heap->RootIsImmortalImmovable(root_index)) {
+ // Write barriers are unnecessary for immortal immovable roots.
+ return kNoWriteBarrier;
+ }
}
}
if (field_representation == MachineRepresentation::kTaggedPointer ||
« no previous file with comments | « src/compiler/representation-change.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698