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

Side by Side Diff: src/compiler/js-global-object-specialization.cc

Issue 2293343002: [turbofan] Remove remaining uses of Class type from the compiler. (Closed)
Patch Set: Created 4 years, 3 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/access-info.cc ('k') | src/compiler/js-native-context-specialization.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/js-global-object-specialization.h" 5 #include "src/compiler/js-global-object-specialization.h"
6 6
7 #include "src/compilation-dependencies.h" 7 #include "src/compilation-dependencies.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Load from constant type cell can benefit from type feedback. 106 // Load from constant type cell can benefit from type feedback.
107 Type* property_cell_value_type = Type::Tagged(); 107 Type* property_cell_value_type = Type::Tagged();
108 if (property_details.cell_type() == PropertyCellType::kConstantType) { 108 if (property_details.cell_type() == PropertyCellType::kConstantType) {
109 // Compute proper type based on the current value in the cell. 109 // Compute proper type based on the current value in the cell.
110 if (property_cell_value->IsSmi()) { 110 if (property_cell_value->IsSmi()) {
111 property_cell_value_type = type_cache_.kSmi; 111 property_cell_value_type = type_cache_.kSmi;
112 } else if (property_cell_value->IsNumber()) { 112 } else if (property_cell_value->IsNumber()) {
113 property_cell_value_type = type_cache_.kHeapNumber; 113 property_cell_value_type = type_cache_.kHeapNumber;
114 } else { 114 } else {
115 // TODO(turbofan): Track the property_cell_value_map on the FieldAccess
116 // below and use it in LoadElimination to eliminate map checks.
115 Handle<Map> property_cell_value_map( 117 Handle<Map> property_cell_value_map(
116 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); 118 Handle<HeapObject>::cast(property_cell_value)->map(), isolate());
117 property_cell_value_type = 119 property_cell_value_type = Type::For(property_cell_value_map);
118 Type::Class(property_cell_value_map, graph()->zone());
119 } 120 }
120 } 121 }
121 Node* value = effect = graph()->NewNode( 122 Node* value = effect = graph()->NewNode(
122 simplified()->LoadField( 123 simplified()->LoadField(
123 AccessBuilder::ForPropertyCellValue(property_cell_value_type)), 124 AccessBuilder::ForPropertyCellValue(property_cell_value_type)),
124 jsgraph()->HeapConstant(property_cell), effect, control); 125 jsgraph()->HeapConstant(property_cell), effect, control);
125 ReplaceWithValue(node, value, effect, control); 126 ReplaceWithValue(node, value, effect, control);
126 return Replace(value); 127 return Replace(value);
127 } 128 }
128 129
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 273 }
273 274
274 275
275 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { 276 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const {
276 return jsgraph()->simplified(); 277 return jsgraph()->simplified();
277 } 278 }
278 279
279 } // namespace compiler 280 } // namespace compiler
280 } // namespace internal 281 } // namespace internal
281 } // namespace v8 282 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698