Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: src/ic/ic.cc

Issue 1034393002: Fix speedup of typedarray-length loading in the ICs as well as Crankshaft (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/accessors.cc ('k') | src/typedarray.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 // Perform a lookup behind the interceptor. Copy the LookupIterator since 1212 // Perform a lookup behind the interceptor. Copy the LookupIterator since
1213 // the original iterator will be used to fetch the value. 1213 // the original iterator will be used to fetch the value.
1214 LookupIterator it = *lookup; 1214 LookupIterator it = *lookup;
1215 it.Next(); 1215 it.Next();
1216 LookupForRead(&it); 1216 LookupForRead(&it);
1217 return compiler.CompileLoadInterceptor(&it); 1217 return compiler.CompileLoadInterceptor(&it);
1218 } 1218 }
1219 1219
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 if (receiver_is_holder) { 1222 // The method will only return true for absolute truths based on the
1223 DCHECK(receiver->IsJSObject()); 1223 // receiver maps.
1224 Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver); 1224 int object_offset;
1225 int object_offset; 1225 if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(),
1226 if (Accessors::IsJSObjectFieldAccessor(map, lookup->name(), 1226 &object_offset)) {
1227 &object_offset)) { 1227 FieldIndex index = FieldIndex::ForInObjectOffset(object_offset, *map);
1228 FieldIndex index = 1228 return SimpleFieldLoad(index);
1229 FieldIndex::ForInObjectOffset(object_offset, js_receiver->map());
1230 return SimpleFieldLoad(index);
1231 }
1232 } 1229 }
1233 1230
1234 Handle<Object> accessors = lookup->GetAccessors(); 1231 Handle<Object> accessors = lookup->GetAccessors();
1235 if (accessors->IsExecutableAccessorInfo()) { 1232 if (accessors->IsExecutableAccessorInfo()) {
1236 Handle<ExecutableAccessorInfo> info = 1233 Handle<ExecutableAccessorInfo> info =
1237 Handle<ExecutableAccessorInfo>::cast(accessors); 1234 Handle<ExecutableAccessorInfo>::cast(accessors);
1238 if (v8::ToCData<Address>(info->getter()) == 0) break; 1235 if (v8::ToCData<Address>(info->getter()) == 0) break;
1239 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, 1236 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info,
1240 map)) { 1237 map)) {
1241 break; 1238 break;
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 static const Address IC_utilities[] = { 3045 static const Address IC_utilities[] = {
3049 #define ADDR(name) FUNCTION_ADDR(name), 3046 #define ADDR(name) FUNCTION_ADDR(name),
3050 IC_UTIL_LIST(ADDR) NULL 3047 IC_UTIL_LIST(ADDR) NULL
3051 #undef ADDR 3048 #undef ADDR
3052 }; 3049 };
3053 3050
3054 3051
3055 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3052 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3056 } 3053 }
3057 } // namespace v8::internal 3054 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698