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/ic/ic.h" | 5 #include "src/ic/ic.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 | 855 |
856 namespace { | 856 namespace { |
857 | 857 |
858 template <bool fill_array> | 858 template <bool fill_array> |
859 int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map, | 859 int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map, |
860 Handle<JSObject> holder, Handle<FixedArray> array, | 860 Handle<JSObject> holder, Handle<FixedArray> array, |
861 Handle<Name> name) { | 861 Handle<Name> name) { |
862 DCHECK(holder->HasFastProperties()); | 862 DCHECK(holder->HasFastProperties()); |
863 | 863 |
864 // The following kinds of receiver maps require custom handler compilation. | 864 // The following kinds of receiver maps require custom handler compilation. |
865 if (receiver_map->IsPrimitiveMap() || receiver_map->IsJSGlobalObjectMap()) { | 865 if (receiver_map->IsJSGlobalObjectMap()) { |
866 return -1; | 866 return -1; |
867 } | 867 } |
868 // We don't encode the requirement to check access rights because we already | 868 // We don't encode the requirement to check access rights because we already |
869 // passed the access check for current native context and the access | 869 // passed the access check for current native context and the access |
870 // can't be revoked. | 870 // can't be revoked. |
871 | 871 |
872 HandleScope scope(isolate); | 872 HandleScope scope(isolate); |
873 int checks_count = 0; | 873 int checks_count = 0; |
874 | 874 |
875 // Switch to custom compiled handler if the prototype chain contains global | 875 // Switch to custom compiled handler if the prototype chain contains global |
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3069 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3070 it.Next(); | 3070 it.Next(); |
3071 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3071 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3072 Object::GetProperty(&it)); | 3072 Object::GetProperty(&it)); |
3073 } | 3073 } |
3074 | 3074 |
3075 return *result; | 3075 return *result; |
3076 } | 3076 } |
3077 } // namespace internal | 3077 } // namespace internal |
3078 } // namespace v8 | 3078 } // namespace v8 |
OLD | NEW |