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

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

Issue 872723003: Load getter from map descriptor instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add mips, mips64, x87 Created 5 years, 11 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/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 break; 1222 break;
1223 } 1223 }
1224 CallOptimization call_optimization(function); 1224 CallOptimization call_optimization(function);
1225 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder, 1225 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1226 cache_holder); 1226 cache_holder);
1227 if (call_optimization.is_simple_api_call() && 1227 if (call_optimization.is_simple_api_call() &&
1228 call_optimization.IsCompatibleReceiver(receiver, holder)) { 1228 call_optimization.IsCompatibleReceiver(receiver, holder)) {
1229 return compiler.CompileLoadCallback(lookup->name(), 1229 return compiler.CompileLoadCallback(lookup->name(),
1230 call_optimization); 1230 call_optimization);
1231 } 1231 }
1232 return compiler.CompileLoadViaGetter(lookup->name(), function); 1232 int expected_arguments = function->shared()->formal_parameter_count();
1233 return compiler.CompileLoadViaGetter(
1234 lookup->name(), lookup->GetAccessorIndex(), expected_arguments);
1233 } 1235 }
1234 break; 1236 break;
1235 } 1237 }
1236 1238
1237 case LookupIterator::DATA: { 1239 case LookupIterator::DATA: {
1238 if (lookup->is_dictionary_holder()) { 1240 if (lookup->is_dictionary_holder()) {
1239 if (kind() != Code::LOAD_IC) break; 1241 if (kind() != Code::LOAD_IC) break;
1240 if (holder->IsGlobalObject()) { 1242 if (holder->IsGlobalObject()) {
1241 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder, 1243 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1242 cache_holder); 1244 cache_holder);
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2969 static const Address IC_utilities[] = { 2971 static const Address IC_utilities[] = {
2970 #define ADDR(name) FUNCTION_ADDR(name), 2972 #define ADDR(name) FUNCTION_ADDR(name),
2971 IC_UTIL_LIST(ADDR) NULL 2973 IC_UTIL_LIST(ADDR) NULL
2972 #undef ADDR 2974 #undef ADDR
2973 }; 2975 };
2974 2976
2975 2977
2976 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 2978 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
2977 } 2979 }
2978 } // namespace v8::internal 2980 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698