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/x64/stub-cache-x64.cc

Issue 14429003: Refactor ExternalReference::isolate_address() to not rely on Isolate::Current(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 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/x64/regexp-macro-assembler-x64.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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 Register name, 365 Register name,
366 Handle<JSObject> holder_obj) { 366 Handle<JSObject> holder_obj) {
367 __ push(name); 367 __ push(name);
368 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor()); 368 Handle<InterceptorInfo> interceptor(holder_obj->GetNamedInterceptor());
369 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor)); 369 ASSERT(!masm->isolate()->heap()->InNewSpace(*interceptor));
370 __ Move(kScratchRegister, interceptor); 370 __ Move(kScratchRegister, interceptor);
371 __ push(kScratchRegister); 371 __ push(kScratchRegister);
372 __ push(receiver); 372 __ push(receiver);
373 __ push(holder); 373 __ push(holder);
374 __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset)); 374 __ push(FieldOperand(kScratchRegister, InterceptorInfo::kDataOffset));
375 __ PushAddress(ExternalReference::isolate_address()); 375 __ PushAddress(ExternalReference::isolate_address(masm->isolate()));
376 } 376 }
377 377
378 378
379 static void CompileCallLoadPropertyWithInterceptor( 379 static void CompileCallLoadPropertyWithInterceptor(
380 MacroAssembler* masm, 380 MacroAssembler* masm,
381 Register receiver, 381 Register receiver,
382 Register holder, 382 Register holder,
383 Register name, 383 Register name,
384 Handle<JSObject> holder_obj) { 384 Handle<JSObject> holder_obj) {
385 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 385 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 __ movq(Operand(rsp, 2 * kPointerSize), rdi); 461 __ movq(Operand(rsp, 2 * kPointerSize), rdi);
462 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 462 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
463 Handle<Object> call_data(api_call_info->data(), masm->isolate()); 463 Handle<Object> call_data(api_call_info->data(), masm->isolate());
464 if (masm->isolate()->heap()->InNewSpace(*call_data)) { 464 if (masm->isolate()->heap()->InNewSpace(*call_data)) {
465 __ Move(rcx, api_call_info); 465 __ Move(rcx, api_call_info);
466 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset)); 466 __ movq(rbx, FieldOperand(rcx, CallHandlerInfo::kDataOffset));
467 __ movq(Operand(rsp, 3 * kPointerSize), rbx); 467 __ movq(Operand(rsp, 3 * kPointerSize), rbx);
468 } else { 468 } else {
469 __ Move(Operand(rsp, 3 * kPointerSize), call_data); 469 __ Move(Operand(rsp, 3 * kPointerSize), call_data);
470 } 470 }
471 __ movq(kScratchRegister, ExternalReference::isolate_address()); 471 __ movq(kScratchRegister,
472 ExternalReference::isolate_address(masm->isolate()));
472 __ movq(Operand(rsp, 4 * kPointerSize), kScratchRegister); 473 __ movq(Operand(rsp, 4 * kPointerSize), kScratchRegister);
473 474
474 // Prepare arguments. 475 // Prepare arguments.
475 __ lea(rbx, Operand(rsp, 4 * kPointerSize)); 476 __ lea(rbx, Operand(rsp, 4 * kPointerSize));
476 477
477 #if defined(__MINGW64__) 478 #if defined(__MINGW64__)
478 Register arguments_arg = rcx; 479 Register arguments_arg = rcx;
479 #elif defined(_WIN64) 480 #elif defined(_WIN64)
480 // Win64 uses first register--rcx--for returned value. 481 // Win64 uses first register--rcx--for returned value.
481 Register arguments_arg = rdx; 482 Register arguments_arg = rdx;
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 1172
1172 __ push(receiver()); // receiver 1173 __ push(receiver()); // receiver
1173 __ push(reg); // holder 1174 __ push(reg); // holder
1174 if (heap()->InNewSpace(callback->data())) { 1175 if (heap()->InNewSpace(callback->data())) {
1175 __ Move(scratch1(), callback); 1176 __ Move(scratch1(), callback);
1176 __ push(FieldOperand(scratch1(), 1177 __ push(FieldOperand(scratch1(),
1177 ExecutableAccessorInfo::kDataOffset)); // data 1178 ExecutableAccessorInfo::kDataOffset)); // data
1178 } else { 1179 } else {
1179 __ Push(Handle<Object>(callback->data(), isolate())); 1180 __ Push(Handle<Object>(callback->data(), isolate()));
1180 } 1181 }
1181 __ PushAddress(ExternalReference::isolate_address()); // isolate 1182 __ PushAddress(ExternalReference::isolate_address(isolate())); // isolate
1182 __ push(name()); // name 1183 __ push(name()); // name
1183 // Save a pointer to where we pushed the arguments pointer. This will be 1184 // Save a pointer to where we pushed the arguments pointer. This will be
1184 // passed as the const ExecutableAccessorInfo& to the C++ callback. 1185 // passed as the const ExecutableAccessorInfo& to the C++ callback.
1185 1186
1186 #if defined(__MINGW64__) 1187 #if defined(__MINGW64__)
1187 Register accessor_info_arg = rdx; 1188 Register accessor_info_arg = rdx;
1188 Register name_arg = rcx; 1189 Register name_arg = rcx;
1189 #elif defined(_WIN64) 1190 #elif defined(_WIN64)
1190 // Win64 uses first register--rcx--for returned value. 1191 // Win64 uses first register--rcx--for returned value.
1191 Register accessor_info_arg = r8; 1192 Register accessor_info_arg = r8;
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3476 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3477 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3477 } 3478 }
3478 } 3479 }
3479 3480
3480 3481
3481 #undef __ 3482 #undef __
3482 3483
3483 } } // namespace v8::internal 3484 } } // namespace v8::internal
3484 3485
3485 #endif // V8_TARGET_ARCH_X64 3486 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698