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

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

Issue 2683903002: Fix missing cases of empty_string canonicalization (Closed)
Patch Set: make LSan happy Created 3 years, 10 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 | « src/arm64/macro-assembler-arm64.h ('k') | src/factory.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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 if (function->nargs >= 0) { 1773 if (function->nargs >= 0) {
1774 // TODO(1236192): Most runtime routines don't need the number of 1774 // TODO(1236192): Most runtime routines don't need the number of
1775 // arguments passed in because it is constant. At some point we 1775 // arguments passed in because it is constant. At some point we
1776 // should remove this need and make the runtime routine entry code 1776 // should remove this need and make the runtime routine entry code
1777 // smarter. 1777 // smarter.
1778 Mov(x0, function->nargs); 1778 Mov(x0, function->nargs);
1779 } 1779 }
1780 JumpToExternalReference(ExternalReference(fid, isolate())); 1780 JumpToExternalReference(ExternalReference(fid, isolate()));
1781 } 1781 }
1782 1782
1783
1784 void MacroAssembler::InitializeNewString(Register string,
1785 Register length,
1786 Heap::RootListIndex map_index,
1787 Register scratch1,
1788 Register scratch2) {
1789 DCHECK(!AreAliased(string, length, scratch1, scratch2));
1790 LoadRoot(scratch2, map_index);
1791 SmiTag(scratch1, length);
1792 Str(scratch2, FieldMemOperand(string, HeapObject::kMapOffset));
1793
1794 Mov(scratch2, String::kEmptyHashField);
1795 Str(scratch1, FieldMemOperand(string, String::kLengthOffset));
1796 Str(scratch2, FieldMemOperand(string, String::kHashFieldOffset));
1797 }
1798
1799
1800 int MacroAssembler::ActivationFrameAlignment() { 1783 int MacroAssembler::ActivationFrameAlignment() {
1801 #if V8_HOST_ARCH_ARM64 1784 #if V8_HOST_ARCH_ARM64
1802 // Running on the real platform. Use the alignment as mandated by the local 1785 // Running on the real platform. Use the alignment as mandated by the local
1803 // environment. 1786 // environment.
1804 // Note: This will break if we ever start generating snapshots on one ARM 1787 // Note: This will break if we ever start generating snapshots on one ARM
1805 // platform for another ARM platform with a different alignment. 1788 // platform for another ARM platform with a different alignment.
1806 return base::OS::ActivationFrameAlignment(); 1789 return base::OS::ActivationFrameAlignment();
1807 #else // V8_HOST_ARCH_ARM64 1790 #else // V8_HOST_ARCH_ARM64
1808 // If we are using the simulator then we should always align to the expected 1791 // If we are using the simulator then we should always align to the expected
1809 // alignment. As the simulator is used to generate snapshots we do not know 1792 // alignment. As the simulator is used to generate snapshots we do not know
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after
4677 } 4660 }
4678 4661
4679 4662
4680 #undef __ 4663 #undef __
4681 4664
4682 4665
4683 } // namespace internal 4666 } // namespace internal
4684 } // namespace v8 4667 } // namespace v8
4685 4668
4686 #endif // V8_TARGET_ARCH_ARM64 4669 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698