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

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

Issue 880333003: Load API accessor from descriptor instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 5 years, 10 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 function->shared()->strict_mode() == SLOPPY) { 1230 function->shared()->strict_mode() == SLOPPY) {
1231 // Calling sloppy non-builtins with a value as the receiver 1231 // Calling sloppy non-builtins with a value as the receiver
1232 // requires boxing. 1232 // requires boxing.
1233 break; 1233 break;
1234 } 1234 }
1235 CallOptimization call_optimization(function); 1235 CallOptimization call_optimization(function);
1236 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder, 1236 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1237 cache_holder); 1237 cache_holder);
1238 if (call_optimization.is_simple_api_call() && 1238 if (call_optimization.is_simple_api_call() &&
1239 call_optimization.IsCompatibleReceiver(receiver, holder)) { 1239 call_optimization.IsCompatibleReceiver(receiver, holder)) {
1240 return compiler.CompileLoadCallback(lookup->name(), 1240 return compiler.CompileLoadCallback(lookup->name(), call_optimization,
1241 call_optimization); 1241 lookup->GetAccessorIndex());
1242 } 1242 }
1243 int expected_arguments = function->shared()->formal_parameter_count(); 1243 int expected_arguments = function->shared()->formal_parameter_count();
1244 return compiler.CompileLoadViaGetter( 1244 return compiler.CompileLoadViaGetter(
1245 lookup->name(), lookup->GetAccessorIndex(), expected_arguments); 1245 lookup->name(), lookup->GetAccessorIndex(), expected_arguments);
1246 } 1246 }
1247 break; 1247 break;
1248 } 1248 }
1249 1249
1250 case LookupIterator::DATA: { 1250 case LookupIterator::DATA: {
1251 if (lookup->is_dictionary_holder()) { 1251 if (lookup->is_dictionary_holder()) {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 if (!setter->IsJSFunction()) { 1734 if (!setter->IsJSFunction()) {
1735 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter not a function"); 1735 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter not a function");
1736 break; 1736 break;
1737 } 1737 }
1738 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); 1738 Handle<JSFunction> function = Handle<JSFunction>::cast(setter);
1739 CallOptimization call_optimization(function); 1739 CallOptimization call_optimization(function);
1740 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder); 1740 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1741 if (call_optimization.is_simple_api_call() && 1741 if (call_optimization.is_simple_api_call() &&
1742 call_optimization.IsCompatibleReceiver(receiver, holder)) { 1742 call_optimization.IsCompatibleReceiver(receiver, holder)) {
1743 return compiler.CompileStoreCallback(receiver, lookup->name(), 1743 return compiler.CompileStoreCallback(receiver, lookup->name(),
1744 call_optimization); 1744 call_optimization,
1745 lookup->GetAccessorIndex());
1745 } 1746 }
1746 int expected_arguments = function->shared()->formal_parameter_count(); 1747 int expected_arguments = function->shared()->formal_parameter_count();
1747 return compiler.CompileStoreViaSetter(receiver, lookup->name(), 1748 return compiler.CompileStoreViaSetter(receiver, lookup->name(),
1748 lookup->GetAccessorIndex(), 1749 lookup->GetAccessorIndex(),
1749 expected_arguments); 1750 expected_arguments);
1750 } 1751 }
1751 break; 1752 break;
1752 } 1753 }
1753 1754
1754 case LookupIterator::DATA: { 1755 case LookupIterator::DATA: {
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 static const Address IC_utilities[] = { 3007 static const Address IC_utilities[] = {
3007 #define ADDR(name) FUNCTION_ADDR(name), 3008 #define ADDR(name) FUNCTION_ADDR(name),
3008 IC_UTIL_LIST(ADDR) NULL 3009 IC_UTIL_LIST(ADDR) NULL
3009 #undef ADDR 3010 #undef ADDR
3010 }; 3011 };
3011 3012
3012 3013
3013 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3014 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3014 } 3015 }
3015 } // namespace v8::internal 3016 } // 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