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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 10081005: Merged r11308, r11311, r11313 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/version.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 Register name, 372 Register name,
373 Handle<JSObject> holder_obj) { 373 Handle<JSObject> holder_obj) {
374 __ push(name); 374 __ push(name);
375 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); 375 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
376 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); 376 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
377 __ Move(kScratchRegister, interceptor); 377 __ Move(kScratchRegister, interceptor);
378 __ push(kScratchRegister); 378 __ push(kScratchRegister);
379 __ push(receiver); 379 __ push(receiver);
380 __ push(holder); 380 __ push(holder);
381 __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset)); 381 __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset));
382 __ push(Immediate(reinterpret_cast<intptr_t>(masm->isolate()))); 382 __ movq(kScratchRegister, ExternalReference::isolate_address());
383 __ push(kScratchRegister);
383 } 384 }
384 385
385 386
386 static void CompileCallLoadPropertyWithInterceptor( 387 static void CompileCallLoadPropertyWithInterceptor(
387 MacroAssembler* masm, 388 MacroAssembler* masm,
388 Register receiver, 389 Register receiver,
389 Register holder, 390 Register holder,
390 Register name, 391 Register name,
391 Handle<JSObject> holder_obj) { 392 Handle<JSObject> holder_obj) {
392 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 393 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 __ movq(Operand(rsp, 2 * kPointerSize), rdi); 469 __ movq(Operand(rsp, 2 * kPointerSize), rdi);
469 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 470 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
470 Handle<Object> call_data(api_call_info->data()); 471 Handle<Object> call_data(api_call_info->data());
471 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 472 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
472 __ Move(rcx, api_call_info); 473 __ Move(rcx, api_call_info);
473 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset)); 474 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset));
474 __ movq(Operand(rsp, 3 * kPointerSize), rbx); 475 __ movq(Operand(rsp, 3 * kPointerSize), rbx);
475 } else { 476 } else {
476 __ Move(Operand(rsp, 3 * kPointerSize), call_data); 477 __ Move(Operand(rsp, 3 * kPointerSize), call_data);
477 } 478 }
478 __ movq(Operand(rsp, 4 * kPointerSize), 479 __ movq(kScratchRegister, ExternalReference::isolate_address());
479 Immediate(reinterpret_cast<intptr_t>(masm->isolate()))); 480 __ movq(Operand(rsp, 4 * kPointerSize), kScratchRegister);
480 481
481 // Prepare arguments. 482 // Prepare arguments.
482 __ lea(rbx, Operand(rsp, 4 * kPointerSize)); 483 __ lea(rbx, Operand(rsp, 4 * kPointerSize));
483 484
484 #ifdef _WIN64 485 #ifdef _WIN64
485 // Win64 uses first register--rcx--for returned value. 486 // Win64 uses first register--rcx--for returned value.
486 Register arguments_arg = rdx; 487 Register arguments_arg = rdx;
487 #else 488 #else
488 Register arguments_arg = rdi; 489 Register arguments_arg = rdi;
489 #endif 490 #endif
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 __ pop(scratch2); // Get return address to place it below. 1003 __ pop(scratch2); // Get return address to place it below.
1003 1004
1004 __ push(receiver); // receiver 1005 __ push(receiver); // receiver
1005 __ push(reg); // holder 1006 __ push(reg); // holder
1006 if (heap()->InNewSpace(callback->data())) { 1007 if (heap()->InNewSpace(callback->data())) {
1007 __ Move(scratch1, callback); 1008 __ Move(scratch1, callback);
1008 __ push(FieldOperand(scratch1, AccessorInfo::kDataOffset)); // data 1009 __ push(FieldOperand(scratch1, AccessorInfo::kDataOffset)); // data
1009 } else { 1010 } else {
1010 __ Push(Handle<Object>(callback->data())); 1011 __ Push(Handle<Object>(callback->data()));
1011 } 1012 }
1012 __ push(Immediate(reinterpret_cast<intptr_t>(isolate()))); // isolate 1013 __ movq(kScratchRegister, ExternalReference::isolate_address());
1014 __ push(kScratchRegister); // isolate
1013 __ push(name_reg); // name 1015 __ push(name_reg); // name
1014 // Save a pointer to where we pushed the arguments pointer. 1016 // Save a pointer to where we pushed the arguments pointer.
1015 // This will be passed as the const AccessorInfo& to the C++ callback. 1017 // This will be passed as the const AccessorInfo& to the C++ callback.
1016 1018
1017 #ifdef _WIN64 1019 #ifdef _WIN64
1018 // Win64 uses first register--rcx--for returned value. 1020 // Win64 uses first register--rcx--for returned value.
1019 Register accessor_info_arg = r8; 1021 Register accessor_info_arg = r8;
1020 Register name_arg = rdx; 1022 Register name_arg = rdx;
1021 #else 1023 #else
1022 Register accessor_info_arg = rsi; 1024 Register accessor_info_arg = rsi;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 ASSERT(callback->getter() != NULL); 1179 ASSERT(callback->getter() != NULL);
1178 1180
1179 // Tail call to runtime. 1181 // Tail call to runtime.
1180 // Important invariant in CALLBACKS case: the code above must be 1182 // Important invariant in CALLBACKS case: the code above must be
1181 // structured to never clobber |receiver| register. 1183 // structured to never clobber |receiver| register.
1182 __ pop(scratch2); // return address 1184 __ pop(scratch2); // return address
1183 __ push(receiver); 1185 __ push(receiver);
1184 __ push(holder_reg); 1186 __ push(holder_reg);
1185 __ Move(holder_reg, callback); 1187 __ Move(holder_reg, callback);
1186 __ push(FieldOperand(holder_reg, AccessorInfo::kDataOffset)); 1188 __ push(FieldOperand(holder_reg, AccessorInfo::kDataOffset));
1187 __ push(Immediate(reinterpret_cast<intptr_t>(isolate()))); 1189 __ movq(kScratchRegister, ExternalReference::isolate_address());
1190 __ push(kScratchRegister);
1188 __ push(holder_reg); 1191 __ push(holder_reg);
1189 __ push(name_reg); 1192 __ push(name_reg);
1190 __ push(scratch2); // restore return address 1193 __ push(scratch2); // restore return address
1191 1194
1192 ExternalReference ref = 1195 ExternalReference ref =
1193 ExternalReference(IC_Utility(IC::kLoadCallbackProperty), 1196 ExternalReference(IC_Utility(IC::kLoadCallbackProperty),
1194 isolate()); 1197 isolate());
1195 __ TailCallExternalReference(ref, 6, 1); 1198 __ TailCallExternalReference(ref, 6, 1);
1196 } 1199 }
1197 } else { // !compile_followup_inline 1200 } else { // !compile_followup_inline
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after
3820 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3823 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3821 } 3824 }
3822 } 3825 }
3823 3826
3824 3827
3825 #undef __ 3828 #undef __
3826 3829
3827 } } // namespace v8::internal 3830 } } // namespace v8::internal
3828 3831
3829 #endif // V8_TARGET_ARCH_X64 3832 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698