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

Unified Diff: src/ic/x64/handler-compiler-x64.cc

Issue 697603002: Optimized nodeType dom binding by removing HandleScope and the preparation of ordinary c function c… (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/x64/handler-compiler-x64.cc
diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc
index a782b088edda0d7e4c222256674749e9951c6b69..ead4067313a5bb8aac43d9d61b9c255ed4ec5fc2 100644
--- a/src/ic/x64/handler-compiler-x64.cc
+++ b/src/ic/x64/handler-compiler-x64.cc
@@ -508,6 +508,8 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6);
+
+ bool fast_call = callback->can_fast_call();
__ Push(receiver()); // receiver
if (heap()->InNewSpace(callback->data())) {
DCHECK(!scratch2().is(reg));
@@ -523,6 +525,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
__ Push(kScratchRegister); // return value default
__ PushAddress(ExternalReference::isolate_address(isolate()));
__ Push(reg); // holder
+ if (fast_call) {
+ // the address of PropertyCallbackInfo
+ __ leap(kScratchRegister, Operand(rsp, 0));
+ __ Push(kScratchRegister);
+ }
__ Push(name()); // name
// Save a pointer to where we pushed the arguments pointer. This will be
// passed as the const PropertyAccessorInfo& to the C++ callback.
@@ -533,6 +540,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
Register api_function_address = ApiGetterDescriptor::function_address();
Address getter_address = v8::ToCData<Address>(callback->getter());
__ Move(api_function_address, getter_address, RelocInfo::EXTERNAL_REFERENCE);
+ if (fast_call) {
+ CallFastApiGetterStub stub(isolate());
+ __ TailCallStub(&stub);
+ return;
+ }
CallApiGetterStub stub(isolate());
__ TailCallStub(&stub);
« no previous file with comments | « src/code-stubs.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698