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/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 | 72 |
73 Handle<HeapType> Object::OptimalType(Isolate* isolate, | 73 Handle<HeapType> Object::OptimalType(Isolate* isolate, |
74 Representation representation) { | 74 Representation representation) { |
75 if (representation.IsNone()) return HeapType::None(isolate); | 75 if (representation.IsNone()) return HeapType::None(isolate); |
76 if (FLAG_track_field_types) { | 76 if (FLAG_track_field_types) { |
77 if (representation.IsHeapObject() && IsHeapObject()) { | 77 if (representation.IsHeapObject() && IsHeapObject()) { |
78 // We can track only JavaScript objects with stable maps. | 78 // We can track only JavaScript objects with stable maps. |
79 Handle<Map> map(HeapObject::cast(this)->map(), isolate); | 79 Handle<Map> map(HeapObject::cast(this)->map(), isolate); |
80 if (map->is_stable() && | 80 if (map->is_stable() && map->IsJSReceiverMap()) { |
81 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE && | |
82 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE) { | |
83 return HeapType::Class(map, isolate); | 81 return HeapType::Class(map, isolate); |
84 } | 82 } |
85 } | 83 } |
86 } | 84 } |
87 return HeapType::Any(isolate); | 85 return HeapType::Any(isolate); |
88 } | 86 } |
89 | 87 |
90 | 88 |
91 MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, | 89 MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate, |
92 Handle<Object> object, | 90 Handle<Object> object, |
(...skipping 19265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19358 if (cell->value() != *new_value) { | 19356 if (cell->value() != *new_value) { |
19359 cell->set_value(*new_value); | 19357 cell->set_value(*new_value); |
19360 Isolate* isolate = cell->GetIsolate(); | 19358 Isolate* isolate = cell->GetIsolate(); |
19361 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19359 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19362 isolate, DependentCode::kPropertyCellChangedGroup); | 19360 isolate, DependentCode::kPropertyCellChangedGroup); |
19363 } | 19361 } |
19364 } | 19362 } |
19365 | 19363 |
19366 } // namespace internal | 19364 } // namespace internal |
19367 } // namespace v8 | 19365 } // namespace v8 |
OLD | NEW |