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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 Type* property_cell_value_type; | 206 Type* property_cell_value_type; |
207 MachineRepresentation representation = MachineRepresentation::kTagged; | 207 MachineRepresentation representation = MachineRepresentation::kTagged; |
208 if (property_cell_value->IsHeapObject()) { | 208 if (property_cell_value->IsHeapObject()) { |
209 // Check that the {value} is a HeapObject. | 209 // Check that the {value} is a HeapObject. |
210 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), | 210 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), |
211 value, effect, control); | 211 value, effect, control); |
212 | 212 |
213 // Check {value} map agains the {property_cell} map. | 213 // Check {value} map agains the {property_cell} map. |
214 Handle<Map> property_cell_value_map( | 214 Handle<Map> property_cell_value_map( |
215 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); | 215 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); |
216 effect = graph()->NewNode( | 216 effect = graph()->NewNode(simplified()->CheckMaps(ZoneHandleSet<Map>( |
217 simplified()->CheckMaps(1), value, | 217 property_cell_value_map)), |
218 jsgraph()->HeapConstant(property_cell_value_map), effect, control); | 218 value, effect, control); |
219 property_cell_value_type = Type::OtherInternal(); | 219 property_cell_value_type = Type::OtherInternal(); |
220 representation = MachineRepresentation::kTaggedPointer; | 220 representation = MachineRepresentation::kTaggedPointer; |
221 } else { | 221 } else { |
222 // Check that the {value} is a Smi. | 222 // Check that the {value} is a Smi. |
223 value = effect = | 223 value = effect = |
224 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); | 224 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); |
225 property_cell_value_type = Type::SignedSmall(); | 225 property_cell_value_type = Type::SignedSmall(); |
226 representation = MachineRepresentation::kTaggedSigned; | 226 representation = MachineRepresentation::kTaggedSigned; |
227 } | 227 } |
228 effect = graph()->NewNode( | 228 effect = graph()->NewNode( |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } | 300 } |
301 | 301 |
302 | 302 |
303 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { | 303 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { |
304 return jsgraph()->simplified(); | 304 return jsgraph()->simplified(); |
305 } | 305 } |
306 | 306 |
307 } // namespace compiler | 307 } // namespace compiler |
308 } // namespace internal | 308 } // namespace internal |
309 } // namespace v8 | 309 } // namespace v8 |
OLD | NEW |