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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 Handle<Map> property_cell_value_map( | 207 Handle<Map> property_cell_value_map( |
208 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); | 208 Handle<HeapObject>::cast(property_cell_value)->map(), isolate()); |
209 if (!property_cell_value_map->is_stable()) return NoChange(); | 209 if (!property_cell_value_map->is_stable()) return NoChange(); |
210 dependencies()->AssumeMapStable(property_cell_value_map); | 210 dependencies()->AssumeMapStable(property_cell_value_map); |
211 | 211 |
212 // Check that the {value} is a HeapObject. | 212 // Check that the {value} is a HeapObject. |
213 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), | 213 value = effect = graph()->NewNode(simplified()->CheckHeapObject(), |
214 value, effect, control); | 214 value, effect, control); |
215 | 215 |
216 // Check {value} map agains the {property_cell} map. | 216 // Check {value} map agains the {property_cell} map. |
217 effect = graph()->NewNode(simplified()->CheckMaps(ZoneHandleSet<Map>( | 217 effect = |
218 property_cell_value_map)), | 218 graph()->NewNode(simplified()->CheckMaps( |
219 value, effect, control); | 219 CheckMapsFlag::kNone, |
| 220 ZoneHandleSet<Map>(property_cell_value_map)), |
| 221 value, effect, control); |
220 property_cell_value_type = Type::OtherInternal(); | 222 property_cell_value_type = Type::OtherInternal(); |
221 representation = MachineRepresentation::kTaggedPointer; | 223 representation = MachineRepresentation::kTaggedPointer; |
222 } else { | 224 } else { |
223 // Check that the {value} is a Smi. | 225 // Check that the {value} is a Smi. |
224 value = effect = | 226 value = effect = |
225 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); | 227 graph()->NewNode(simplified()->CheckSmi(), value, effect, control); |
226 property_cell_value_type = Type::SignedSmall(); | 228 property_cell_value_type = Type::SignedSmall(); |
227 representation = MachineRepresentation::kTaggedSigned; | 229 representation = MachineRepresentation::kTaggedSigned; |
228 } | 230 } |
229 effect = graph()->NewNode(simplified()->StoreField(ForPropertyCellValue( | 231 effect = graph()->NewNode(simplified()->StoreField(ForPropertyCellValue( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 return jsgraph()->javascript(); | 285 return jsgraph()->javascript(); |
284 } | 286 } |
285 | 287 |
286 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { | 288 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { |
287 return jsgraph()->simplified(); | 289 return jsgraph()->simplified(); |
288 } | 290 } |
289 | 291 |
290 } // namespace compiler | 292 } // namespace compiler |
291 } // namespace internal | 293 } // namespace internal |
292 } // namespace v8 | 294 } // namespace v8 |
OLD | NEW |