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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 254783003: Convert function.name to API-style accessor and make CallApiGetterStub serializable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/macro-assembler-x64.h ('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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 660 }
661 661
662 662
663 void MacroAssembler::PrepareCallApiFunction(int arg_stack_space) { 663 void MacroAssembler::PrepareCallApiFunction(int arg_stack_space) {
664 EnterApiExitFrame(arg_stack_space); 664 EnterApiExitFrame(arg_stack_space);
665 } 665 }
666 666
667 667
668 void MacroAssembler::CallApiFunctionAndReturn( 668 void MacroAssembler::CallApiFunctionAndReturn(
669 Register function_address, 669 Register function_address,
670 Address thunk_address, 670 ExternalReference thunk_ref,
671 Register thunk_last_arg, 671 Register thunk_last_arg,
672 int stack_space, 672 int stack_space,
673 Operand return_value_operand, 673 Operand return_value_operand,
674 Operand* context_restore_operand) { 674 Operand* context_restore_operand) {
675 Label prologue; 675 Label prologue;
676 Label promote_scheduled_exception; 676 Label promote_scheduled_exception;
677 Label exception_handled; 677 Label exception_handled;
678 Label delete_allocated_handles; 678 Label delete_allocated_handles;
679 Label leave_exit_frame; 679 Label leave_exit_frame;
680 Label write_back; 680 Label write_back;
(...skipping 26 matching lines...) Expand all
707 PushSafepointRegisters(); 707 PushSafepointRegisters();
708 PrepareCallCFunction(1); 708 PrepareCallCFunction(1);
709 LoadAddress(arg_reg_1, ExternalReference::isolate_address(isolate())); 709 LoadAddress(arg_reg_1, ExternalReference::isolate_address(isolate()));
710 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1); 710 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1);
711 PopSafepointRegisters(); 711 PopSafepointRegisters();
712 } 712 }
713 713
714 714
715 Label profiler_disabled; 715 Label profiler_disabled;
716 Label end_profiler_check; 716 Label end_profiler_check;
717 bool* is_profiling_flag = 717 Move(rax, ExternalReference::is_profiling_address(isolate()));
718 isolate()->cpu_profiler()->is_profiling_address();
719 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
720 Move(rax, is_profiling_flag, RelocInfo::EXTERNAL_REFERENCE);
721 cmpb(Operand(rax, 0), Immediate(0)); 718 cmpb(Operand(rax, 0), Immediate(0));
722 j(zero, &profiler_disabled); 719 j(zero, &profiler_disabled);
723 720
724 // Third parameter is the address of the actual getter function. 721 // Third parameter is the address of the actual getter function.
725 Move(thunk_last_arg, function_address); 722 Move(thunk_last_arg, function_address);
726 Move(rax, thunk_address, RelocInfo::EXTERNAL_REFERENCE); 723 Move(rax, thunk_ref);
727 jmp(&end_profiler_check); 724 jmp(&end_profiler_check);
728 725
729 bind(&profiler_disabled); 726 bind(&profiler_disabled);
730 // Call the api function! 727 // Call the api function!
731 Move(rax, function_address); 728 Move(rax, function_address);
732 729
733 bind(&end_profiler_check); 730 bind(&end_profiler_check);
734 731
735 // Call the api function! 732 // Call the api function!
736 call(rax); 733 call(rax);
(...skipping 4467 matching lines...) Expand 10 before | Expand all | Expand 10 after
5204 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); 5201 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift()));
5205 movl(rax, dividend); 5202 movl(rax, dividend);
5206 shrl(rax, Immediate(31)); 5203 shrl(rax, Immediate(31));
5207 addl(rdx, rax); 5204 addl(rdx, rax);
5208 } 5205 }
5209 5206
5210 5207
5211 } } // namespace v8::internal 5208 } } // namespace v8::internal
5212 5209
5213 #endif // V8_TARGET_ARCH_X64 5210 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698