| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { | 3060 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { |
| 3061 DisallowHeapAllocation no_gc; | 3061 DisallowHeapAllocation no_gc; |
| 3062 if (!object->map()->is_prototype_map()) return; | 3062 if (!object->map()->is_prototype_map()) return; |
| 3063 if (!IsFastArrayConstructorPrototypeChainIntact()) return; | 3063 if (!IsFastArrayConstructorPrototypeChainIntact()) return; |
| 3064 if (!IsArrayOrObjectPrototype(*object)) return; | 3064 if (!IsArrayOrObjectPrototype(*object)) return; |
| 3065 PropertyCell::SetValueWithInvalidation( | 3065 PropertyCell::SetValueWithInvalidation( |
| 3066 factory()->array_protector(), | 3066 factory()->array_protector(), |
| 3067 handle(Smi::FromInt(kProtectorInvalid), this)); | 3067 handle(Smi::FromInt(kProtectorInvalid), this)); |
| 3068 } | 3068 } |
| 3069 | 3069 |
| 3070 void Isolate::InvalidateHasInstanceProtector() { | |
| 3071 DCHECK(factory()->has_instance_protector()->value()->IsSmi()); | |
| 3072 DCHECK(IsHasInstanceLookupChainIntact()); | |
| 3073 PropertyCell::SetValueWithInvalidation( | |
| 3074 factory()->has_instance_protector(), | |
| 3075 handle(Smi::FromInt(kProtectorInvalid), this)); | |
| 3076 DCHECK(!IsHasInstanceLookupChainIntact()); | |
| 3077 } | |
| 3078 | |
| 3079 void Isolate::InvalidateIsConcatSpreadableProtector() { | 3070 void Isolate::InvalidateIsConcatSpreadableProtector() { |
| 3080 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi()); | 3071 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi()); |
| 3081 DCHECK(IsIsConcatSpreadableLookupChainIntact()); | 3072 DCHECK(IsIsConcatSpreadableLookupChainIntact()); |
| 3082 factory()->is_concat_spreadable_protector()->set_value( | 3073 factory()->is_concat_spreadable_protector()->set_value( |
| 3083 Smi::FromInt(kProtectorInvalid)); | 3074 Smi::FromInt(kProtectorInvalid)); |
| 3084 DCHECK(!IsIsConcatSpreadableLookupChainIntact()); | 3075 DCHECK(!IsIsConcatSpreadableLookupChainIntact()); |
| 3085 } | 3076 } |
| 3086 | 3077 |
| 3087 void Isolate::InvalidateArraySpeciesProtector() { | 3078 void Isolate::InvalidateArraySpeciesProtector() { |
| 3088 DCHECK(factory()->species_protector()->value()->IsSmi()); | 3079 DCHECK(factory()->species_protector()->value()->IsSmi()); |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3656 // Then check whether this scope intercepts. | 3647 // Then check whether this scope intercepts. |
| 3657 if ((flag & intercept_mask_)) { | 3648 if ((flag & intercept_mask_)) { |
| 3658 intercepted_flags_ |= flag; | 3649 intercepted_flags_ |= flag; |
| 3659 return true; | 3650 return true; |
| 3660 } | 3651 } |
| 3661 return false; | 3652 return false; |
| 3662 } | 3653 } |
| 3663 | 3654 |
| 3664 } // namespace internal | 3655 } // namespace internal |
| 3665 } // namespace v8 | 3656 } // namespace v8 |
| OLD | NEW |