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

Side by Side Diff: src/compiler/typed-optimization.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 unified diff | Download patch
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/typed-optimization.h" 5 #include "src/compiler/typed-optimization.h"
6 6
7 #include "src/compilation-dependencies.h" 7 #include "src/compilation-dependencies.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return ReduceSelect(node); 91 return ReduceSelect(node);
92 default: 92 default:
93 break; 93 break;
94 } 94 }
95 return NoChange(); 95 return NoChange();
96 } 96 }
97 97
98 namespace { 98 namespace {
99 99
100 MaybeHandle<Map> GetStableMapFromObjectType(Type* object_type) { 100 MaybeHandle<Map> GetStableMapFromObjectType(Type* object_type) {
101 if (object_type->IsHeapConstant() && 101 if (object_type->IsHeapConstant()) {
102 object_type->AsHeapConstant()->Value()->IsHeapObject()) { 102 Handle<Map> object_map(object_type->AsHeapConstant()->Value()->map());
103 Handle<Map> object_map(
104 Handle<HeapObject>::cast(object_type->AsHeapConstant()->Value())
105 ->map());
106 if (object_map->is_stable()) return object_map; 103 if (object_map->is_stable()) return object_map;
107 } 104 }
108 return MaybeHandle<Map>(); 105 return MaybeHandle<Map>();
109 } 106 }
110 107
111 } // namespace 108 } // namespace
112 109
113 Reduction TypedOptimization::ReduceCheckMaps(Node* node) { 110 Reduction TypedOptimization::ReduceCheckMaps(Node* node) {
114 // The CheckMaps(o, ...map...) can be eliminated if map is stable, 111 // The CheckMaps(o, ...map...) can be eliminated if map is stable,
115 // o has type Constant(object) and map == object->map, and either 112 // o has type Constant(object) and map == object->map, and either
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 244
248 Isolate* TypedOptimization::isolate() const { return jsgraph()->isolate(); } 245 Isolate* TypedOptimization::isolate() const { return jsgraph()->isolate(); }
249 246
250 SimplifiedOperatorBuilder* TypedOptimization::simplified() const { 247 SimplifiedOperatorBuilder* TypedOptimization::simplified() const {
251 return jsgraph()->simplified(); 248 return jsgraph()->simplified();
252 } 249 }
253 250
254 } // namespace compiler 251 } // namespace compiler
255 } // namespace internal 252 } // namespace internal
256 } // namespace v8 253 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698