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

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

Issue 1567024: Land patch by Pavel Podivilov (podivilov@chromium.org). (Closed)
Patch Set: Created 10 years, 8 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 | src/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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 700
701 701
702 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 702 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
703 // ---------- S t a t e -------------- 703 // ---------- S t a t e --------------
704 // -- lr : return address 704 // -- lr : return address
705 // -- sp[0] : key 705 // -- sp[0] : key
706 // -- sp[4] : receiver 706 // -- sp[4] : receiver
707 // ----------------------------------- 707 // -----------------------------------
708 708
709 Label miss, index_ok;
710
711 // Get the key and receiver object from the stack.
712 __ ldm(ia, sp, r0.bit() | r1.bit());
713
714 // Check that the receiver isn't a smi.
715 __ BranchOnSmi(r1, &miss);
716
717 // Check that the receiver is a string.
718 Condition is_string = masm->IsObjectStringType(r1, r2);
719 __ b(NegateCondition(is_string), &miss);
720
721 // Check if key is a smi or a heap number.
722 __ BranchOnSmi(r0, &index_ok);
723 __ CheckMap(r0, r2, Factory::heap_number_map(), &miss, false);
724
725 __ bind(&index_ok);
726 // Duplicate receiver and key since they are expected on the stack after
727 // the KeyedLoadIC call.
728 __ stm(db_w, sp, r0.bit() | r1.bit());
729 __ InvokeBuiltin(Builtins::STRING_CHAR_AT, JUMP_JS);
730
731 __ bind(&miss);
709 GenerateGeneric(masm); 732 GenerateGeneric(masm);
710 } 733 }
711 734
712 735
713 // Convert unsigned integer with specified number of leading zeroes in binary 736 // Convert unsigned integer with specified number of leading zeroes in binary
714 // representation to IEEE 754 double. 737 // representation to IEEE 754 double.
715 // Integer to convert is passed in register hiword. 738 // Integer to convert is passed in register hiword.
716 // Resulting double is returned in registers hiword:loword. 739 // Resulting double is returned in registers hiword:loword.
717 // This functions does not work correctly for 0. 740 // This functions does not work correctly for 0.
718 static void GenerateUInt2Double(MacroAssembler* masm, 741 static void GenerateUInt2Double(MacroAssembler* masm,
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 __ bind(&miss); 1685 __ bind(&miss);
1663 1686
1664 GenerateMiss(masm); 1687 GenerateMiss(masm);
1665 } 1688 }
1666 1689
1667 1690
1668 #undef __ 1691 #undef __
1669 1692
1670 1693
1671 } } // namespace v8::internal 1694 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698