OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 14927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14938 InterceptorInfo* JSObject::GetNamedInterceptor() { | 14938 InterceptorInfo* JSObject::GetNamedInterceptor() { |
14939 DCHECK(map()->has_named_interceptor()); | 14939 DCHECK(map()->has_named_interceptor()); |
14940 JSFunction* constructor = JSFunction::cast(map()->GetConstructor()); | 14940 JSFunction* constructor = JSFunction::cast(map()->GetConstructor()); |
14941 DCHECK(constructor->shared()->IsApiFunction()); | 14941 DCHECK(constructor->shared()->IsApiFunction()); |
14942 Object* result = | 14942 Object* result = |
14943 constructor->shared()->get_api_func_data()->named_property_handler(); | 14943 constructor->shared()->get_api_func_data()->named_property_handler(); |
14944 return InterceptorInfo::cast(result); | 14944 return InterceptorInfo::cast(result); |
14945 } | 14945 } |
14946 | 14946 |
14947 | 14947 |
14948 InterceptorInfo* JSObject::GetIndexedInterceptor() { | |
14949 DCHECK(map()->has_indexed_interceptor()); | |
14950 JSFunction* constructor = JSFunction::cast(map()->GetConstructor()); | |
14951 DCHECK(constructor->shared()->IsApiFunction()); | |
14952 Object* result = | |
14953 constructor->shared()->get_api_func_data()->indexed_property_handler(); | |
14954 return InterceptorInfo::cast(result); | |
14955 } | |
14956 | |
14957 | |
14958 MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it, | 14948 MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it, |
14959 bool* done) { | 14949 bool* done) { |
14960 *done = false; | 14950 *done = false; |
14961 Isolate* isolate = it->isolate(); | 14951 Isolate* isolate = it->isolate(); |
14962 // Make sure that the top context does not change when doing callbacks or | 14952 // Make sure that the top context does not change when doing callbacks or |
14963 // interceptor calls. | 14953 // interceptor calls. |
14964 AssertNoContextChange ncc(isolate); | 14954 AssertNoContextChange ncc(isolate); |
14965 | 14955 |
14966 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); | 14956 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); |
14967 Handle<InterceptorInfo> interceptor = it->GetInterceptor(); | 14957 Handle<InterceptorInfo> interceptor = it->GetInterceptor(); |
(...skipping 3462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18430 if (cell->value() != *new_value) { | 18420 if (cell->value() != *new_value) { |
18431 cell->set_value(*new_value); | 18421 cell->set_value(*new_value); |
18432 Isolate* isolate = cell->GetIsolate(); | 18422 Isolate* isolate = cell->GetIsolate(); |
18433 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18423 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18434 isolate, DependentCode::kPropertyCellChangedGroup); | 18424 isolate, DependentCode::kPropertyCellChangedGroup); |
18435 } | 18425 } |
18436 } | 18426 } |
18437 | 18427 |
18438 } // namespace internal | 18428 } // namespace internal |
18439 } // namespace v8 | 18429 } // namespace v8 |
OLD | NEW |