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

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

Issue 594773002: X87: Make KeyedLoads from a sloppy arguments array use a handler. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 __ ret(0); 498 __ ret(0);
499 499
500 StubRuntimeCallHelper call_helper; 500 StubRuntimeCallHelper call_helper;
501 char_at_generator.GenerateSlow(masm, call_helper); 501 char_at_generator.GenerateSlow(masm, call_helper);
502 502
503 __ bind(&miss); 503 __ bind(&miss);
504 GenerateMiss(masm); 504 GenerateMiss(masm);
505 } 505 }
506 506
507 507
508 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
509 // The return address is on the stack.
510 Register receiver = LoadDescriptor::ReceiverRegister();
511 Register key = LoadDescriptor::NameRegister();
512 DCHECK(receiver.is(edx));
513 DCHECK(key.is(ecx));
514
515 Label slow, notin;
516 Factory* factory = masm->isolate()->factory();
517 Operand mapped_location = GenerateMappedArgumentsLookup(
518 masm, receiver, key, ebx, eax, &notin, &slow);
519 __ mov(eax, mapped_location);
520 __ Ret();
521 __ bind(&notin);
522 // The unmapped lookup expects that the parameter map is in ebx.
523 Operand unmapped_location =
524 GenerateUnmappedArgumentsLookup(masm, key, ebx, eax, &slow);
525 __ cmp(unmapped_location, factory->the_hole_value());
526 __ j(equal, &slow);
527 __ mov(eax, unmapped_location);
528 __ Ret();
529 __ bind(&slow);
530 GenerateMiss(masm);
531 }
532
533
534 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 508 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
535 // Return address is on the stack. 509 // Return address is on the stack.
536 Label slow, notin; 510 Label slow, notin;
537 Register receiver = StoreDescriptor::ReceiverRegister(); 511 Register receiver = StoreDescriptor::ReceiverRegister();
538 Register name = StoreDescriptor::NameRegister(); 512 Register name = StoreDescriptor::NameRegister();
539 Register value = StoreDescriptor::ValueRegister(); 513 Register value = StoreDescriptor::ValueRegister();
540 DCHECK(receiver.is(edx)); 514 DCHECK(receiver.is(edx));
541 DCHECK(name.is(ecx)); 515 DCHECK(name.is(ecx));
542 DCHECK(value.is(eax)); 516 DCHECK(value.is(eax));
543 517
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 Condition cc = 977 Condition cc =
1004 (check == ENABLE_INLINED_SMI_CHECK) 978 (check == ENABLE_INLINED_SMI_CHECK)
1005 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 979 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1006 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 980 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1007 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 981 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1008 } 982 }
1009 } 983 }
1010 } // namespace v8::internal 984 } // namespace v8::internal
1011 985
1012 #endif // V8_TARGET_ARCH_X87 986 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698