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

Side by Side Diff: src/arm/code-stubs-arm.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 | « src/a64/stub-cache-a64.cc ('k') | src/arm/stub-cache-arm.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 5430 matching lines...) Expand 10 before | Expand all | Expand 10 after
5441 // -- sp[argc * 4] : receiver 5441 // -- sp[argc * 4] : receiver
5442 // ----------------------------------- 5442 // -----------------------------------
5443 5443
5444 Register callee = r0; 5444 Register callee = r0;
5445 Register call_data = r4; 5445 Register call_data = r4;
5446 Register holder = r2; 5446 Register holder = r2;
5447 Register api_function_address = r1; 5447 Register api_function_address = r1;
5448 Register context = cp; 5448 Register context = cp;
5449 5449
5450 int argc = ArgumentBits::decode(bit_field_); 5450 int argc = ArgumentBits::decode(bit_field_);
5451 bool restore_context = RestoreContextBits::decode(bit_field_); 5451 bool is_store = IsStoreBits::decode(bit_field_);
5452 bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_); 5452 bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_);
5453 5453
5454 typedef FunctionCallbackArguments FCA; 5454 typedef FunctionCallbackArguments FCA;
5455 5455
5456 STATIC_ASSERT(FCA::kContextSaveIndex == 6); 5456 STATIC_ASSERT(FCA::kContextSaveIndex == 6);
5457 STATIC_ASSERT(FCA::kCalleeIndex == 5); 5457 STATIC_ASSERT(FCA::kCalleeIndex == 5);
5458 STATIC_ASSERT(FCA::kDataIndex == 4); 5458 STATIC_ASSERT(FCA::kDataIndex == 4);
5459 STATIC_ASSERT(FCA::kReturnValueOffset == 3); 5459 STATIC_ASSERT(FCA::kReturnValueOffset == 3);
5460 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); 5460 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
5461 STATIC_ASSERT(FCA::kIsolateIndex == 1); 5461 STATIC_ASSERT(FCA::kIsolateIndex == 1);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
5519 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; 5519 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1;
5520 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); 5520 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback);
5521 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; 5521 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL;
5522 ApiFunction thunk_fun(thunk_address); 5522 ApiFunction thunk_fun(thunk_address);
5523 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, 5523 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5524 masm->isolate()); 5524 masm->isolate());
5525 5525
5526 AllowExternalCallThatCantCauseGC scope(masm); 5526 AllowExternalCallThatCantCauseGC scope(masm);
5527 MemOperand context_restore_operand( 5527 MemOperand context_restore_operand(
5528 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); 5528 fp, (2 + FCA::kContextSaveIndex) * kPointerSize);
5529 MemOperand return_value_operand(fp, 5529 // Stores return the first js argument
5530 (2 + FCA::kReturnValueOffset) * kPointerSize); 5530 int return_value_offset =
5531 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset);
5532 MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
5531 5533
5532 __ CallApiFunctionAndReturn(api_function_address, 5534 __ CallApiFunctionAndReturn(api_function_address,
5533 thunk_ref, 5535 thunk_ref,
5534 kStackUnwindSpace, 5536 kStackUnwindSpace,
5535 return_value_operand, 5537 return_value_operand,
5536 restore_context ? 5538 &context_restore_operand);
5537 &context_restore_operand : NULL);
5538 } 5539 }
5539 5540
5540 5541
5541 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5542 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5542 // ----------- S t a t e ------------- 5543 // ----------- S t a t e -------------
5543 // -- sp[0] : name 5544 // -- sp[0] : name
5544 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object 5545 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object
5545 // -- ... 5546 // -- ...
5546 // -- r2 : api_function_address 5547 // -- r2 : api_function_address
5547 // ----------------------------------- 5548 // -----------------------------------
(...skipping 26 matching lines...) Expand all
5574 MemOperand(fp, 6 * kPointerSize), 5575 MemOperand(fp, 6 * kPointerSize),
5575 NULL); 5576 NULL);
5576 } 5577 }
5577 5578
5578 5579
5579 #undef __ 5580 #undef __
5580 5581
5581 } } // namespace v8::internal 5582 } } // namespace v8::internal
5582 5583
5583 #endif // V8_TARGET_ARCH_ARM 5584 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/a64/stub-cache-a64.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698