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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 7795018: Generated code for substring slices in x64 and arm. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Applied Bill's suggestions. Created 9 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/arm/macro-assembler-arm.h ('k') | src/ia32/code-stubs-ia32.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 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 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 TAG_OBJECT); 1718 TAG_OBJECT);
1719 1719
1720 InitializeNewString(result, 1720 InitializeNewString(result,
1721 length, 1721 length,
1722 Heap::kConsAsciiStringMapRootIndex, 1722 Heap::kConsAsciiStringMapRootIndex,
1723 scratch1, 1723 scratch1,
1724 scratch2); 1724 scratch2);
1725 } 1725 }
1726 1726
1727 1727
1728 void MacroAssembler::AllocateTwoByteSlicedString(Register result,
1729 Register length,
1730 Register scratch1,
1731 Register scratch2,
1732 Label* gc_required) {
1733 AllocateInNewSpace(SlicedString::kSize,
1734 result,
1735 scratch1,
1736 scratch2,
1737 gc_required,
1738 TAG_OBJECT);
1739
1740 InitializeNewString(result,
1741 length,
1742 Heap::kSlicedStringMapRootIndex,
1743 scratch1,
1744 scratch2);
1745 }
1746
1747
1748 void MacroAssembler::AllocateAsciiSlicedString(Register result,
1749 Register length,
1750 Register scratch1,
1751 Register scratch2,
1752 Label* gc_required) {
1753 AllocateInNewSpace(SlicedString::kSize,
1754 result,
1755 scratch1,
1756 scratch2,
1757 gc_required,
1758 TAG_OBJECT);
1759
1760 InitializeNewString(result,
1761 length,
1762 Heap::kSlicedAsciiStringMapRootIndex,
1763 scratch1,
1764 scratch2);
1765 }
1766
1767
1728 void MacroAssembler::CompareObjectType(Register object, 1768 void MacroAssembler::CompareObjectType(Register object,
1729 Register map, 1769 Register map,
1730 Register type_reg, 1770 Register type_reg,
1731 InstanceType type) { 1771 InstanceType type) {
1732 ldr(map, FieldMemOperand(object, HeapObject::kMapOffset)); 1772 ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
1733 CompareInstanceType(map, type_reg, type); 1773 CompareInstanceType(map, type_reg, type);
1734 } 1774 }
1735 1775
1736 1776
1737 void MacroAssembler::CompareInstanceType(Register map, 1777 void MacroAssembler::CompareInstanceType(Register map,
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
3229 void CodePatcher::EmitCondition(Condition cond) { 3269 void CodePatcher::EmitCondition(Condition cond) {
3230 Instr instr = Assembler::instr_at(masm_.pc_); 3270 Instr instr = Assembler::instr_at(masm_.pc_);
3231 instr = (instr & ~kCondMask) | cond; 3271 instr = (instr & ~kCondMask) | cond;
3232 masm_.emit(instr); 3272 masm_.emit(instr);
3233 } 3273 }
3234 3274
3235 3275
3236 } } // namespace v8::internal 3276 } } // namespace v8::internal
3237 3277
3238 #endif // V8_TARGET_ARCH_ARM 3278 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698