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

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

Issue 2293343002: [turbofan] Remove remaining uses of Class type from the compiler. (Closed)
Patch Set: Created 4 years, 4 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-global-object-specialization.cc ('k') | 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/js-native-context-specialization.cc
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc
index 445f4d061b44bf099aa9e19acd00eff5a51797a9..b856e5de1e58697381dc21b31be7c8cf822746da 100644
--- a/src/compiler/js-native-context-specialization.cc
+++ b/src/compiler/js-native-context-specialization.cc
@@ -906,6 +906,8 @@ JSNativeContextSpecialization::BuildPropertyAccess(
}
field_access.machine_type = MachineType::Float64();
}
+ // TODO(turbofan): Track the field_map (if any) on the {field_access} and
+ // use it in LoadElimination to eliminate map checks.
value = effect = graph()->NewNode(simplified()->LoadField(field_access),
storage, effect, control);
} else {
@@ -956,14 +958,12 @@ JSNativeContextSpecialization::BuildPropertyAccess(
// Ensure that {value} is a HeapObject.
value = effect = graph()->NewNode(simplified()->CheckTaggedPointer(),
value, effect, control);
- if (field_type->NumClasses() == 1) {
+ Handle<Map> field_map;
+ if (access_info.field_map().ToHandle(&field_map)) {
// Emit a map check for the value.
- Node* field_map =
- jsgraph()->Constant(field_type->Classes().Current());
effect = graph()->NewNode(simplified()->CheckMaps(1), value,
- field_map, effect, control);
- } else {
- DCHECK_EQ(0, field_type->NumClasses());
+ jsgraph()->HeapConstant(field_map), effect,
+ control);
}
} else {
// DCHECK(field_type->Is(Type::Tagged()));
« no previous file with comments | « src/compiler/js-global-object-specialization.cc ('k') | src/compiler/typed-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698