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

Side by Side Diff: src/ic/mips/ic-mips.cc

Issue 546683003: Make KeyedLoads from a sloppy arguments array use a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Webkit test found bug, updating. Created 6 years, 3 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/ic/ic-compiler.cc ('k') | src/ic/x64/ic-x64.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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 __ lw(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); 367 __ lw(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset));
368 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); 368 __ Branch(slow_case, Ugreater_equal, key, Operand(scratch));
369 __ li(scratch, Operand(kPointerSize >> 1)); 369 __ li(scratch, Operand(kPointerSize >> 1));
370 __ Mul(scratch, key, scratch); 370 __ Mul(scratch, key, scratch);
371 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 371 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
372 __ Addu(scratch, backing_store, scratch); 372 __ Addu(scratch, backing_store, scratch);
373 return MemOperand(scratch); 373 return MemOperand(scratch);
374 } 374 }
375 375
376 376
377 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
378 // The return address is in ra.
379 Register receiver = LoadDescriptor::ReceiverRegister();
380 Register key = LoadDescriptor::NameRegister();
381 DCHECK(receiver.is(a1));
382 DCHECK(key.is(a2));
383
384 Label slow, notin;
385 MemOperand mapped_location = GenerateMappedArgumentsLookup(
386 masm, receiver, key, a0, a3, t0, &notin, &slow);
387 __ Ret(USE_DELAY_SLOT);
388 __ lw(v0, mapped_location);
389 __ bind(&notin);
390 // The unmapped lookup expects that the parameter map is in a0.
391 MemOperand unmapped_location =
392 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow);
393 __ lw(a0, unmapped_location);
394 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
395 __ Branch(&slow, eq, a0, Operand(a3));
396 __ Ret(USE_DELAY_SLOT);
397 __ mov(v0, a0);
398 __ bind(&slow);
399 GenerateMiss(masm);
400 }
401
402
403 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 377 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
404 Register receiver = StoreDescriptor::ReceiverRegister(); 378 Register receiver = StoreDescriptor::ReceiverRegister();
405 Register key = StoreDescriptor::NameRegister(); 379 Register key = StoreDescriptor::NameRegister();
406 Register value = StoreDescriptor::ValueRegister(); 380 Register value = StoreDescriptor::ValueRegister();
407 DCHECK(value.is(a0)); 381 DCHECK(value.is(a0));
408 382
409 Label slow, notin; 383 Label slow, notin;
410 // Store address is returned in register (of MemOperand) mapped_location. 384 // Store address is returned in register (of MemOperand) mapped_location.
411 MemOperand mapped_location = GenerateMappedArgumentsLookup( 385 MemOperand mapped_location = GenerateMappedArgumentsLookup(
412 masm, receiver, key, a3, t0, t1, &notin, &slow); 386 masm, receiver, key, a3, t0, t1, &notin, &slow);
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 patcher.ChangeBranchCondition(ne); 1015 patcher.ChangeBranchCondition(ne);
1042 } else { 1016 } else {
1043 DCHECK(Assembler::IsBne(branch_instr)); 1017 DCHECK(Assembler::IsBne(branch_instr));
1044 patcher.ChangeBranchCondition(eq); 1018 patcher.ChangeBranchCondition(eq);
1045 } 1019 }
1046 } 1020 }
1047 } 1021 }
1048 } // namespace v8::internal 1022 } // namespace v8::internal
1049 1023
1050 #endif // V8_TARGET_ARCH_MIPS 1024 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ic-compiler.cc ('k') | src/ic/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698