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

Side by Side Diff: src/ic/arm64/ic-arm64.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/arm/ic-arm.cc ('k') | src/ic/handler-compiler.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 // 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 365
366 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 366 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
367 // The return address is in lr. 367 // The return address is in lr.
368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
369 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 369 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
370 } 370 }
371 371
372 372
373 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
374 // The return address is in lr.
375 Register result = x0;
376 Register receiver = LoadDescriptor::ReceiverRegister();
377 Register key = LoadDescriptor::NameRegister();
378 DCHECK(receiver.is(x1));
379 DCHECK(key.is(x2));
380
381 Label miss, unmapped;
382
383 Register map_scratch = x0;
384 MemOperand mapped_location = GenerateMappedArgumentsLookup(
385 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss);
386 __ Ldr(result, mapped_location);
387 __ Ret();
388
389 __ Bind(&unmapped);
390 // Parameter map is left in map_scratch when a jump on unmapped is done.
391 MemOperand unmapped_location =
392 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss);
393 __ Ldr(result, unmapped_location);
394 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss);
395 __ Ret();
396
397 __ Bind(&miss);
398 GenerateMiss(masm);
399 }
400
401
402 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 373 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
403 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); 374 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
404 Label slow, notin; 375 Label slow, notin;
405 Register value = StoreDescriptor::ValueRegister(); 376 Register value = StoreDescriptor::ValueRegister();
406 Register key = StoreDescriptor::NameRegister(); 377 Register key = StoreDescriptor::NameRegister();
407 Register receiver = StoreDescriptor::ReceiverRegister(); 378 Register receiver = StoreDescriptor::ReceiverRegister();
408 DCHECK(receiver.is(x1)); 379 DCHECK(receiver.is(x1));
409 DCHECK(key.is(x2)); 380 DCHECK(key.is(x2));
410 DCHECK(value.is(x0)); 381 DCHECK(value.is(x0));
411 382
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 } else { 1030 } else {
1060 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 1031 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
1061 // This is JumpIfSmi(smi_reg, branch_imm). 1032 // This is JumpIfSmi(smi_reg, branch_imm).
1062 patcher.tbz(smi_reg, 0, branch_imm); 1033 patcher.tbz(smi_reg, 0, branch_imm);
1063 } 1034 }
1064 } 1035 }
1065 } 1036 }
1066 } // namespace v8::internal 1037 } // namespace v8::internal
1067 1038
1068 #endif // V8_TARGET_ARCH_ARM64 1039 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm/ic-arm.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698