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

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

Issue 1587073003: Array length reduction should throw in strict mode if it can't delete an element. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing for relanding Created 4 years, 11 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 | « src/ic/x87/handler-compiler-x87.cc ('k') | src/mips64/code-stubs-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 5530 matching lines...) Expand 10 before | Expand all | Expand 10 after
5541 bool is_store = this->is_store(); 5541 bool is_store = this->is_store();
5542 int argc = this->argc(); 5542 int argc = this->argc();
5543 bool call_data_undefined = this->call_data_undefined(); 5543 bool call_data_undefined = this->call_data_undefined();
5544 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store, 5544 CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
5545 call_data_undefined); 5545 call_data_undefined);
5546 } 5546 }
5547 5547
5548 5548
5549 void CallApiGetterStub::Generate(MacroAssembler* masm) { 5549 void CallApiGetterStub::Generate(MacroAssembler* masm) {
5550 // ----------- S t a t e ------------- 5550 // ----------- S t a t e -------------
5551 // -- sp[0] : name 5551 // -- sp[0] : name
5552 // -- sp[4 - kArgsLength*4] : PropertyCallbackArguments object 5552 // -- sp[4 .. (4 + kArgsLength*4)] : v8::PropertyCallbackInfo::args_
5553 // -- ... 5553 // -- ...
5554 // -- a2 : api_function_address 5554 // -- a2 : api_function_address
5555 // ----------------------------------- 5555 // -----------------------------------
5556 5556
5557 Register api_function_address = ApiGetterDescriptor::function_address(); 5557 Register api_function_address = ApiGetterDescriptor::function_address();
5558 DCHECK(api_function_address.is(a2)); 5558 DCHECK(api_function_address.is(a2));
5559 5559
5560 __ mov(a0, sp); // a0 = Handle<Name> 5560 // v8::PropertyCallbackInfo::args_ array and name handle.
5561 __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = PCA 5561 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5562
5563 // Load address of v8::PropertyAccessorInfo::args_ array and name handle.
5564 __ mov(a0, sp); // a0 = Handle<Name>
5565 __ Addu(a1, a0, Operand(1 * kPointerSize)); // a1 = v8::PCI::args_
5562 5566
5563 const int kApiStackSpace = 1; 5567 const int kApiStackSpace = 1;
5564 FrameScope frame_scope(masm, StackFrame::MANUAL); 5568 FrameScope frame_scope(masm, StackFrame::MANUAL);
5565 __ EnterExitFrame(false, kApiStackSpace); 5569 __ EnterExitFrame(false, kApiStackSpace);
5566 5570
5567 // Create PropertyAccessorInfo instance on the stack above the exit frame with 5571 // Create v8::PropertyCallbackInfo object on the stack and initialize
5568 // a1 (internal::Object** args_) as the data. 5572 // it's args_ field.
5569 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); 5573 __ sw(a1, MemOperand(sp, 1 * kPointerSize));
5570 __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = AccessorInfo& 5574 __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = v8::PropertyCallbackInfo&
5571
5572 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5573 5575
5574 ExternalReference thunk_ref = 5576 ExternalReference thunk_ref =
5575 ExternalReference::invoke_accessor_getter_callback(isolate()); 5577 ExternalReference::invoke_accessor_getter_callback(isolate());
5578
5579 // +3 is to skip prolog, return address and name handle.
5580 MemOperand return_value_operand(
5581 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize);
5576 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5582 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5577 kStackUnwindSpace, kInvalidStackOffset, 5583 kStackUnwindSpace, kInvalidStackOffset,
5578 MemOperand(fp, 6 * kPointerSize), NULL); 5584 return_value_operand, NULL);
5579 } 5585 }
5580 5586
5581 5587
5582 #undef __ 5588 #undef __
5583 5589
5584 } // namespace internal 5590 } // namespace internal
5585 } // namespace v8 5591 } // namespace v8
5586 5592
5587 #endif // V8_TARGET_ARCH_MIPS 5593 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x87/handler-compiler-x87.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698