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

Unified Diff: src/compiler/typed-optimization.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-native-context-specialization.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typed-optimization.cc
diff --git a/src/compiler/typed-optimization.cc b/src/compiler/typed-optimization.cc
index 4fef5323e4e1c9bef51d4cad907aaaf6adbf0203..89a8651bacb96a8f5d6b7bf0dfbf8d0ca9ea899e 100644
--- a/src/compiler/typed-optimization.cc
+++ b/src/compiler/typed-optimization.cc
@@ -97,9 +97,6 @@ MaybeHandle<Map> GetStableMapFromObjectType(Type* object_type) {
Handle<Map> object_map(
Handle<HeapObject>::cast(object_type->AsConstant()->Value())->map());
if (object_map->is_stable()) return object_map;
- } else if (object_type->IsClass()) {
- Handle<Map> object_map = object_type->AsClass()->Map();
- if (object_map->is_stable()) return object_map;
}
return MaybeHandle<Map>();
}
@@ -107,11 +104,8 @@ MaybeHandle<Map> GetStableMapFromObjectType(Type* object_type) {
} // namespace
Reduction TypedOptimization::ReduceCheckMaps(Node* node) {
- // The CheckMaps(o, ...map...) can be eliminated if map is stable and
- // either
- // (a) o has type Constant(object) and map == object->map, or
- // (b) o has type Class(map),
- // and either
+ // The CheckMaps(o, ...map...) can be eliminated if map is stable,
+ // o has type Constant(object) and map == object->map, and either
// (1) map cannot transition further, or
// (2) we can add a code dependency on the stability of map
// (to guard the Constant type information).
@@ -151,10 +145,8 @@ Reduction TypedOptimization::ReduceLoadField(Node* node) {
FieldAccess const& access = FieldAccessOf(node->op());
if (access.base_is_tagged == kTaggedBase &&
access.offset == HeapObject::kMapOffset) {
- // We can replace LoadField[Map](o) with map if is stable and either
- // (a) o has type Constant(object) and map == object->map, or
- // (b) o has type Class(map),
- // and either
+ // We can replace LoadField[Map](o) with map if is stable, and
+ // o has type Constant(object) and map == object->map, and either
// (1) map cannot transition further, or
// (2) deoptimization is enabled and we can add a code dependency on the
// stability of map (to guard the Constant type information).
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698