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 #ifndef V8_ISOLATE_INL_H_ | 5 #ifndef V8_ISOLATE_INL_H_ |
6 #define V8_ISOLATE_INL_H_ | 6 #define V8_ISOLATE_INL_H_ |
7 | 7 |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
10 | 10 |
(...skipping 102 matching lines...) Loading... |
113 // All that could be checked reliably is that | 113 // All that could be checked reliably is that |
114 // Array.prototype.constructor == Array. Given that limitation, no check is | 114 // Array.prototype.constructor == Array. Given that limitation, no check is |
115 // done here. In place, there are mjsunit tests harmony/array-species* which | 115 // done here. In place, there are mjsunit tests harmony/array-species* which |
116 // ensure that behavior is correct in various invalid protector cases. | 116 // ensure that behavior is correct in various invalid protector cases. |
117 | 117 |
118 Cell* species_cell = heap()->species_protector(); | 118 Cell* species_cell = heap()->species_protector(); |
119 return species_cell->value()->IsSmi() && | 119 return species_cell->value()->IsSmi() && |
120 Smi::cast(species_cell->value())->value() == kArrayProtectorValid; | 120 Smi::cast(species_cell->value())->value() == kArrayProtectorValid; |
121 } | 121 } |
122 | 122 |
| 123 bool Isolate::IsHasInstanceLookupChainIntact() { |
| 124 if (!FLAG_harmony_instanceof) return true; |
| 125 PropertyCell* has_instance_cell = heap()->has_instance_protector(); |
| 126 return has_instance_cell->value() == Smi::FromInt(kArrayProtectorValid); |
| 127 } |
| 128 |
123 } // namespace internal | 129 } // namespace internal |
124 } // namespace v8 | 130 } // namespace v8 |
125 | 131 |
126 #endif // V8_ISOLATE_INL_H_ | 132 #endif // V8_ISOLATE_INL_H_ |
OLD | NEW |