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

Side by Side Diff: src/heap/heap.cc

Issue 2694063005: [HEAP] Remove SIMD 128 bit alignment from heap. (Closed)
Patch Set: Restore deleted bounds check in deserializer. 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/globals.h ('k') | src/snapshot/deserializer.h » ('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 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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 #endif 1963 #endif
1964 1964
1965 1965
1966 int Heap::GetMaximumFillToAlign(AllocationAlignment alignment) { 1966 int Heap::GetMaximumFillToAlign(AllocationAlignment alignment) {
1967 switch (alignment) { 1967 switch (alignment) {
1968 case kWordAligned: 1968 case kWordAligned:
1969 return 0; 1969 return 0;
1970 case kDoubleAligned: 1970 case kDoubleAligned:
1971 case kDoubleUnaligned: 1971 case kDoubleUnaligned:
1972 return kDoubleSize - kPointerSize; 1972 return kDoubleSize - kPointerSize;
1973 case kSimd128Unaligned:
1974 return kSimd128Size - kPointerSize;
1975 default: 1973 default:
1976 UNREACHABLE(); 1974 UNREACHABLE();
1977 } 1975 }
1978 return 0; 1976 return 0;
1979 } 1977 }
1980 1978
1981 1979
1982 int Heap::GetFillToAlign(Address address, AllocationAlignment alignment) { 1980 int Heap::GetFillToAlign(Address address, AllocationAlignment alignment) {
1983 intptr_t offset = OffsetFrom(address); 1981 intptr_t offset = OffsetFrom(address);
1984 if (alignment == kDoubleAligned && (offset & kDoubleAlignmentMask) != 0) 1982 if (alignment == kDoubleAligned && (offset & kDoubleAlignmentMask) != 0)
1985 return kPointerSize; 1983 return kPointerSize;
1986 if (alignment == kDoubleUnaligned && (offset & kDoubleAlignmentMask) == 0) 1984 if (alignment == kDoubleUnaligned && (offset & kDoubleAlignmentMask) == 0)
1987 return kDoubleSize - kPointerSize; // No fill if double is always aligned. 1985 return kDoubleSize - kPointerSize; // No fill if double is always aligned.
1988 if (alignment == kSimd128Unaligned) {
1989 return (kSimd128Size - (static_cast<int>(offset) + kPointerSize)) &
1990 kSimd128AlignmentMask;
1991 }
1992 return 0; 1986 return 0;
1993 } 1987 }
1994 1988
1995 1989
1996 HeapObject* Heap::PrecedeWithFiller(HeapObject* object, int filler_size) { 1990 HeapObject* Heap::PrecedeWithFiller(HeapObject* object, int filler_size) {
1997 CreateFillerObjectAt(object->address(), filler_size, ClearRecordedSlots::kNo); 1991 CreateFillerObjectAt(object->address(), filler_size, ClearRecordedSlots::kNo);
1998 return HeapObject::FromAddress(object->address() + filler_size); 1992 return HeapObject::FromAddress(object->address() + filler_size);
1999 } 1993 }
2000 1994
2001 1995
(...skipping 4519 matching lines...) Expand 10 before | Expand all | Expand 10 after
6521 } 6515 }
6522 6516
6523 6517
6524 // static 6518 // static
6525 int Heap::GetStaticVisitorIdForMap(Map* map) { 6519 int Heap::GetStaticVisitorIdForMap(Map* map) {
6526 return StaticVisitorBase::GetVisitorId(map); 6520 return StaticVisitorBase::GetVisitorId(map);
6527 } 6521 }
6528 6522
6529 } // namespace internal 6523 } // namespace internal
6530 } // namespace v8 6524 } // namespace v8
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/snapshot/deserializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698