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 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2943 | 2943 |
2944 void Isolate::InvalidateStringLengthOverflowProtector() { | 2944 void Isolate::InvalidateStringLengthOverflowProtector() { |
2945 DCHECK(factory()->string_length_protector()->value()->IsSmi()); | 2945 DCHECK(factory()->string_length_protector()->value()->IsSmi()); |
2946 DCHECK(IsStringLengthOverflowIntact()); | 2946 DCHECK(IsStringLengthOverflowIntact()); |
2947 PropertyCell::SetValueWithInvalidation( | 2947 PropertyCell::SetValueWithInvalidation( |
2948 factory()->string_length_protector(), | 2948 factory()->string_length_protector(), |
2949 handle(Smi::FromInt(kArrayProtectorInvalid), this)); | 2949 handle(Smi::FromInt(kArrayProtectorInvalid), this)); |
2950 DCHECK(!IsStringLengthOverflowIntact()); | 2950 DCHECK(!IsStringLengthOverflowIntact()); |
2951 } | 2951 } |
2952 | 2952 |
| 2953 void Isolate::InvalidateArrayIteratorProtector() { |
| 2954 DCHECK(factory()->array_iterator_protector()->value()->IsSmi()); |
| 2955 DCHECK(IsArrayIteratorLookupChainIntact()); |
| 2956 factory()->array_iterator_protector()->set_value( |
| 2957 Smi::FromInt(kArrayProtectorInvalid)); |
| 2958 DCHECK(!IsArrayIteratorLookupChainIntact()); |
| 2959 } |
| 2960 |
2953 bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) { | 2961 bool Isolate::IsAnyInitialArrayPrototype(Handle<JSArray> array) { |
2954 DisallowHeapAllocation no_gc; | 2962 DisallowHeapAllocation no_gc; |
2955 return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX); | 2963 return IsInAnyContext(*array, Context::INITIAL_ARRAY_PROTOTYPE_INDEX); |
2956 } | 2964 } |
2957 | 2965 |
2958 | 2966 |
2959 CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) { | 2967 CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) { |
2960 DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS); | 2968 DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS); |
2961 return &call_descriptor_data_[index]; | 2969 return &call_descriptor_data_[index]; |
2962 } | 2970 } |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3486 // Then check whether this scope intercepts. | 3494 // Then check whether this scope intercepts. |
3487 if ((flag & intercept_mask_)) { | 3495 if ((flag & intercept_mask_)) { |
3488 intercepted_flags_ |= flag; | 3496 intercepted_flags_ |= flag; |
3489 return true; | 3497 return true; |
3490 } | 3498 } |
3491 return false; | 3499 return false; |
3492 } | 3500 } |
3493 | 3501 |
3494 } // namespace internal | 3502 } // namespace internal |
3495 } // namespace v8 | 3503 } // namespace v8 |
OLD | NEW |