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

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

Issue 166653003: api accessor store ics should return passed value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/a64/stub-cache-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 5563 matching lines...) Expand 10 before | Expand all | Expand 10 after
5574 // -- sp[argc * 8] : receiver 5574 // -- sp[argc * 8] : receiver
5575 // ----------------------------------- 5575 // -----------------------------------
5576 5576
5577 Register callee = x0; 5577 Register callee = x0;
5578 Register call_data = x4; 5578 Register call_data = x4;
5579 Register holder = x2; 5579 Register holder = x2;
5580 Register api_function_address = x1; 5580 Register api_function_address = x1;
5581 Register context = cp; 5581 Register context = cp;
5582 5582
5583 int argc = ArgumentBits::decode(bit_field_); 5583 int argc = ArgumentBits::decode(bit_field_);
5584 bool restore_context = RestoreContextBits::decode(bit_field_); 5584 bool is_store = IsStoreBits::decode(bit_field_);
5585 bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_); 5585 bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_);
5586 5586
5587 typedef FunctionCallbackArguments FCA; 5587 typedef FunctionCallbackArguments FCA;
5588 5588
5589 STATIC_ASSERT(FCA::kContextSaveIndex == 6); 5589 STATIC_ASSERT(FCA::kContextSaveIndex == 6);
5590 STATIC_ASSERT(FCA::kCalleeIndex == 5); 5590 STATIC_ASSERT(FCA::kCalleeIndex == 5);
5591 STATIC_ASSERT(FCA::kDataIndex == 4); 5591 STATIC_ASSERT(FCA::kDataIndex == 4);
5592 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5592 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5593 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5593 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5594 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5594 STATIC_ASSERT(FCA::kIsolateIndex == 1);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
5647 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; 5647 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1;
5648 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); 5648 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback);
5649 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; 5649 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL;
5650 ApiFunction thunk_fun(thunk_address); 5650 ApiFunction thunk_fun(thunk_address);
5651 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, 5651 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5652 masm->isolate()); 5652 masm->isolate());
5653 5653
5654 AllowExternalCallThatCantCauseGC scope(masm); 5654 AllowExternalCallThatCantCauseGC scope(masm);
5655 MemOperand context_restore_operand( 5655 MemOperand context_restore_operand(
5656 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); 5656 fp, (2 + FCA::kContextSaveIndex) * kPointerSize);
5657 MemOperand return_value_operand(fp, 5657 // Stores return the first js argument
5658 (2 + FCA::kReturnValueOffset) * kPointerSize); 5658 int return_value_offset =
5659 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset);
5660 MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
5659 5661
5660 const int spill_offset = 1 + kApiStackSpace; 5662 const int spill_offset = 1 + kApiStackSpace;
5661 __ CallApiFunctionAndReturn(api_function_address, 5663 __ CallApiFunctionAndReturn(api_function_address,
5662 thunk_ref, 5664 thunk_ref,
5663 kStackUnwindSpace, 5665 kStackUnwindSpace,
5664 spill_offset, 5666 spill_offset,
5665 return_value_operand, 5667 return_value_operand,
5666 restore_context ? 5668 &context_restore_operand);
5667 &context_restore_operand : NULL);
5668 } 5669 }
5669 5670
5670 5671
5671 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5672 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5672 // ----------- S t a t e ------------- 5673 // ----------- S t a t e -------------
5673 // -- sp[0] : name 5674 // -- sp[0] : name
5674 // -- sp[8 - kArgsLength*8] : PropertyCallbackArguments object 5675 // -- sp[8 - kArgsLength*8] : PropertyCallbackArguments object
5675 // -- ... 5676 // -- ...
5676 // -- x2 : api_function_address 5677 // -- x2 : api_function_address
5677 // ----------------------------------- 5678 // -----------------------------------
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
5712 MemOperand(fp, 6 * kPointerSize), 5713 MemOperand(fp, 6 * kPointerSize),
5713 NULL); 5714 NULL);
5714 } 5715 }
5715 5716
5716 5717
5717 #undef __ 5718 #undef __
5718 5719
5719 } } // namespace v8::internal 5720 } } // namespace v8::internal
5720 5721
5721 #endif // V8_TARGET_ARCH_A64 5722 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | src/a64/stub-cache-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698