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

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

Issue 8510005: Simplify StringCharCodeAt in non-crankshaft codegen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 524 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
525 // ----------- S t a t e ------------- 525 // ----------- S t a t e -------------
526 // -- rax : key 526 // -- rax : key
527 // -- rdx : receiver 527 // -- rdx : receiver
528 // -- rsp[0] : return address 528 // -- rsp[0] : return address
529 // ----------------------------------- 529 // -----------------------------------
530 Label miss; 530 Label miss;
531 531
532 Register receiver = rdx; 532 Register receiver = rdx;
533 Register index = rax; 533 Register index = rax;
534 Register scratch1 = rbx; 534 Register scratch = rcx;
535 Register scratch2 = rcx;
536 Register result = rax; 535 Register result = rax;
537 536
538 StringCharAtGenerator char_at_generator(receiver, 537 StringCharAtGenerator char_at_generator(receiver,
539 index, 538 index,
540 scratch1, 539 scratch,
541 scratch2,
542 result, 540 result,
543 &miss, // When not a string. 541 &miss, // When not a string.
544 &miss, // When not a number. 542 &miss, // When not a number.
545 &miss, // When index out of range. 543 &miss, // When index out of range.
546 STRING_INDEX_IS_ARRAY_INDEX); 544 STRING_INDEX_IS_ARRAY_INDEX);
547 char_at_generator.GenerateFast(masm); 545 char_at_generator.GenerateFast(masm);
548 __ ret(0); 546 __ ret(0);
549 547
550 StubRuntimeCallHelper call_helper; 548 StubRuntimeCallHelper call_helper;
551 char_at_generator.GenerateSlow(masm, call_helper); 549 char_at_generator.GenerateSlow(masm, call_helper);
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1689 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1692 ? not_zero 1690 ? not_zero
1693 : zero; 1691 : zero;
1694 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1692 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1695 } 1693 }
1696 1694
1697 1695
1698 } } // namespace v8::internal 1696 } } // namespace v8::internal
1699 1697
1700 #endif // V8_TARGET_ARCH_X64 1698 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698