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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 case LookupIterator::ACCESSOR: { | 1220 case LookupIterator::ACCESSOR: { |
1221 // Use simple field loads for some well-known callback properties. | 1221 // Use simple field loads for some well-known callback properties. |
1222 // The method will only return true for absolute truths based on the | 1222 // The method will only return true for absolute truths based on the |
1223 // receiver maps. | 1223 // receiver maps. |
1224 int object_offset; | 1224 int object_offset; |
1225 if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(), | 1225 if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(), |
1226 &object_offset)) { | 1226 &object_offset)) { |
1227 FieldIndex index = FieldIndex::ForInObjectOffset(object_offset, *map); | 1227 FieldIndex index = FieldIndex::ForInObjectOffset(object_offset, *map); |
1228 return SimpleFieldLoad(index); | 1228 return SimpleFieldLoad(index); |
1229 } | 1229 } |
1230 if (Accessors::IsJSArrayBufferViewFieldAccessor(map, lookup->name(), | |
1231 &object_offset)) { | |
1232 FieldIndex index = FieldIndex::ForInObjectOffset(object_offset, *map); | |
1233 ArrayBufferViewLoadFieldStub stub(isolate(), index); | |
1234 return stub.GetCode(); | |
1235 } | |
1236 | 1230 |
1237 Handle<Object> accessors = lookup->GetAccessors(); | 1231 Handle<Object> accessors = lookup->GetAccessors(); |
1238 if (accessors->IsExecutableAccessorInfo()) { | 1232 if (accessors->IsExecutableAccessorInfo()) { |
1239 Handle<ExecutableAccessorInfo> info = | 1233 Handle<ExecutableAccessorInfo> info = |
1240 Handle<ExecutableAccessorInfo>::cast(accessors); | 1234 Handle<ExecutableAccessorInfo>::cast(accessors); |
1241 if (v8::ToCData<Address>(info->getter()) == 0) break; | 1235 if (v8::ToCData<Address>(info->getter()) == 0) break; |
1242 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, | 1236 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, |
1243 map)) { | 1237 map)) { |
1244 break; | 1238 break; |
1245 } | 1239 } |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 static const Address IC_utilities[] = { | 3045 static const Address IC_utilities[] = { |
3052 #define ADDR(name) FUNCTION_ADDR(name), | 3046 #define ADDR(name) FUNCTION_ADDR(name), |
3053 IC_UTIL_LIST(ADDR) NULL | 3047 IC_UTIL_LIST(ADDR) NULL |
3054 #undef ADDR | 3048 #undef ADDR |
3055 }; | 3049 }; |
3056 | 3050 |
3057 | 3051 |
3058 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3052 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
3059 } | 3053 } |
3060 } // namespace v8::internal | 3054 } // namespace v8::internal |
OLD | NEW |