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

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

Issue 1107843002: Reland "Remove the weak list of views from array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use bounds check 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/hydrogen-instructions.h ('k') | src/objects.h » ('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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
1230 1236
1231 Handle<Object> accessors = lookup->GetAccessors(); 1237 Handle<Object> accessors = lookup->GetAccessors();
1232 if (accessors->IsExecutableAccessorInfo()) { 1238 if (accessors->IsExecutableAccessorInfo()) {
1233 Handle<ExecutableAccessorInfo> info = 1239 Handle<ExecutableAccessorInfo> info =
1234 Handle<ExecutableAccessorInfo>::cast(accessors); 1240 Handle<ExecutableAccessorInfo>::cast(accessors);
1235 if (v8::ToCData<Address>(info->getter()) == 0) break; 1241 if (v8::ToCData<Address>(info->getter()) == 0) break;
1236 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, 1242 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info,
1237 map)) { 1243 map)) {
1238 break; 1244 break;
1239 } 1245 }
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 static const Address IC_utilities[] = { 3046 static const Address IC_utilities[] = {
3041 #define ADDR(name) FUNCTION_ADDR(name), 3047 #define ADDR(name) FUNCTION_ADDR(name),
3042 IC_UTIL_LIST(ADDR) NULL 3048 IC_UTIL_LIST(ADDR) NULL
3043 #undef ADDR 3049 #undef ADDR
3044 }; 3050 };
3045 3051
3046 3052
3047 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3053 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3048 } 3054 }
3049 } // namespace v8::internal 3055 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698