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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 148383017: MIPS: stub api getters. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Fixed typo. Created 6 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 | « no previous file | src/mips/stub-cache-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 // 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 5641 matching lines...) Expand 10 before | Expand all | Expand 10 after
5652 __ CallApiFunctionAndReturn(api_function_address, 5652 __ CallApiFunctionAndReturn(api_function_address,
5653 thunk_ref, 5653 thunk_ref,
5654 thunk_arg, 5654 thunk_arg,
5655 kStackUnwindSpace, 5655 kStackUnwindSpace,
5656 return_value_operand, 5656 return_value_operand,
5657 restore_context ? 5657 restore_context ?
5658 &context_restore_operand : NULL); 5658 &context_restore_operand : NULL);
5659 } 5659 }
5660 5660
5661 5661
5662 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5663 // ----------- S t a t e -------------
5664 // -- sp[0] : name
5665 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
5666 // -- ...
5667 // -- a3 : api_function_address
5668 // -- a2 : thunk_last_arg
5669 // -----------------------------------
5670
5671 Register api_function_address = a3;
5672 Register thunk_last_arg = a2;
5673
5674 __ mov(a0, sp); // a0 = Handle<Name>
5675 __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA
5676
5677 const int kApiStackSpace = 1;
5678 FrameScope frame_scope(masm, StackFrame::MANUAL);
5679 __ EnterExitFrame(false, kApiStackSpace);
5680
5681 // Create PropertyAccessorInfo instance on the stack above the exit frame with
5682 // a1 (internal::Object** args_) as the data.
5683 __ sw(a1, MemOperand(sp, 1 * kPointerSize));
5684 __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = AccessorInfo&
5685
5686 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5687
5688 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
5689 ExternalReference::Type thunk_type =
5690 ExternalReference::PROFILING_GETTER_CALL;
5691 ApiFunction thunk_fun(thunk_address);
5692 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5693 masm->isolate());
5694 __ CallApiFunctionAndReturn(api_function_address,
5695 thunk_ref,
5696 thunk_last_arg,
5697 kStackUnwindSpace,
5698 MemOperand(fp, 6 * kPointerSize),
5699 NULL);
5700 }
5701
5702
5662 #undef __ 5703 #undef __
5663 5704
5664 } } // namespace v8::internal 5705 } } // namespace v8::internal
5665 5706
5666 #endif // V8_TARGET_ARCH_MIPS 5707 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698