| 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 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3066 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { | 3066 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { |
| 3067 DisallowHeapAllocation no_gc; | 3067 DisallowHeapAllocation no_gc; |
| 3068 if (!object->map()->is_prototype_map()) return; | 3068 if (!object->map()->is_prototype_map()) return; |
| 3069 if (!IsFastArrayConstructorPrototypeChainIntact()) return; | 3069 if (!IsFastArrayConstructorPrototypeChainIntact()) return; |
| 3070 if (!IsArrayOrObjectPrototype(*object)) return; | 3070 if (!IsArrayOrObjectPrototype(*object)) return; |
| 3071 PropertyCell::SetValueWithInvalidation( | 3071 PropertyCell::SetValueWithInvalidation( |
| 3072 factory()->array_protector(), | 3072 factory()->array_protector(), |
| 3073 handle(Smi::FromInt(kProtectorInvalid), this)); | 3073 handle(Smi::FromInt(kProtectorInvalid), this)); |
| 3074 } | 3074 } |
| 3075 | 3075 |
| 3076 void Isolate::InvalidateHasInstanceProtector() { | |
| 3077 DCHECK(factory()->has_instance_protector()->value()->IsSmi()); | |
| 3078 DCHECK(IsHasInstanceLookupChainIntact()); | |
| 3079 PropertyCell::SetValueWithInvalidation( | |
| 3080 factory()->has_instance_protector(), | |
| 3081 handle(Smi::FromInt(kProtectorInvalid), this)); | |
| 3082 DCHECK(!IsHasInstanceLookupChainIntact()); | |
| 3083 } | |
| 3084 | |
| 3085 void Isolate::InvalidateIsConcatSpreadableProtector() { | 3076 void Isolate::InvalidateIsConcatSpreadableProtector() { |
| 3086 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi()); | 3077 DCHECK(factory()->is_concat_spreadable_protector()->value()->IsSmi()); |
| 3087 DCHECK(IsIsConcatSpreadableLookupChainIntact()); | 3078 DCHECK(IsIsConcatSpreadableLookupChainIntact()); |
| 3088 factory()->is_concat_spreadable_protector()->set_value( | 3079 factory()->is_concat_spreadable_protector()->set_value( |
| 3089 Smi::FromInt(kProtectorInvalid)); | 3080 Smi::FromInt(kProtectorInvalid)); |
| 3090 DCHECK(!IsIsConcatSpreadableLookupChainIntact()); | 3081 DCHECK(!IsIsConcatSpreadableLookupChainIntact()); |
| 3091 } | 3082 } |
| 3092 | 3083 |
| 3093 void Isolate::InvalidateArraySpeciesProtector() { | 3084 void Isolate::InvalidateArraySpeciesProtector() { |
| 3094 DCHECK(factory()->species_protector()->value()->IsSmi()); | 3085 DCHECK(factory()->species_protector()->value()->IsSmi()); |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 // Then check whether this scope intercepts. | 3653 // Then check whether this scope intercepts. |
| 3663 if ((flag & intercept_mask_)) { | 3654 if ((flag & intercept_mask_)) { |
| 3664 intercepted_flags_ |= flag; | 3655 intercepted_flags_ |= flag; |
| 3665 return true; | 3656 return true; |
| 3666 } | 3657 } |
| 3667 return false; | 3658 return false; |
| 3668 } | 3659 } |
| 3669 | 3660 |
| 3670 } // namespace internal | 3661 } // namespace internal |
| 3671 } // namespace v8 | 3662 } // namespace v8 |
| OLD | NEW |