OLD | NEW |
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 Handle<Map> property_cell_value_map( | 199 Handle<Map> property_cell_value_map( |
200 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); | 200 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); |
201 if (!property_cell_value_map->is_stable()) return NoChange(); | 201 if (!property_cell_value_map->is_stable()) return NoChange(); |
202 dependencies()->AssumeMapStable(property_cell_value_map); | 202 dependencies()->AssumeMapStable(property_cell_value_map); |
203 | 203 |
204 // Check that the {value} is a HeapObject. | 204 // Check that the {value} is a HeapObject. |
205 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), | 205 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), |
206 value, effect, control); | 206 value, effect, control); |
207 | 207 |
208 // Check {value} map agains the {property_cell} map. | 208 // Check {value} map agains the {property_cell} map. |
209 effect = graph()->NewNode( | 209 effect = graph()->NewNode(simplified()->CheckMaps(ZoneHandleSet<Map>( |
210 simplified()->CheckMaps(1), value, | 210 property_cell_value_map)), |
211 jsgraph()->HeapConstant(property_cell_value_map), effect, control); | 211 value, effect, control); |
212 property_cell_value_type = Type::OtherInternal(); | 212 property_cell_value_type = Type::OtherInternal(); |
213 representation = MachineRepresentation::kTaggedPointer; | 213 representation = MachineRepresentation::kTaggedPointer; |
214 } else { | 214 } else { |
215 // Check that the {value} is a Smi. | 215 // Check that the {value} is a Smi. |
216 value = effect = | 216 value = effect = |
217 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); | 217 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); |
218 property_cell_value_type = Type::SignedSmall(); | 218 property_cell_value_type = Type::SignedSmall(); |
219 representation = MachineRepresentation::kTaggedSigned; | 219 representation = MachineRepresentation::kTaggedSigned; |
220 } | 220 } |
221 effect = graph()->NewNode( | 221 effect = graph()->NewNode( |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return jsgraph()->javascript(); | 273 return jsgraph()->javascript(); |
274 } | 274 } |
275 | 275 |
276 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { | 276 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { |
277 return jsgraph()->simplified(); | 277 return jsgraph()->simplified(); |
278 } | 278 } |
279 | 279 |
280 } // namespace compiler | 280 } // namespace compiler |
281 } // namespace internal | 281 } // namespace internal |
282 } // namespace v8 | 282 } // namespace v8 |
OLD | NEW |