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

Side by Side Diff: src/globals.h

Issue 1128433006: Make sure fixed typed array is always double aligned for doubles (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/heap/heap.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 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 #ifndef V8_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask) 633 (((value) + kObjectAlignmentMask) & ~kObjectAlignmentMask)
634 634
635 // POINTER_SIZE_ALIGN returns the value aligned as a pointer. 635 // POINTER_SIZE_ALIGN returns the value aligned as a pointer.
636 #define POINTER_SIZE_ALIGN(value) \ 636 #define POINTER_SIZE_ALIGN(value) \
637 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask) 637 (((value) + kPointerAlignmentMask) & ~kPointerAlignmentMask)
638 638
639 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment. 639 // CODE_POINTER_ALIGN returns the value aligned as a generated code segment.
640 #define CODE_POINTER_ALIGN(value) \ 640 #define CODE_POINTER_ALIGN(value) \
641 (((value) + kCodeAlignmentMask) & ~kCodeAlignmentMask) 641 (((value) + kCodeAlignmentMask) & ~kCodeAlignmentMask)
642 642
643 // DOUBLE_POINTER_ALIGN returns the value algined for double pointers.
644 #define DOUBLE_POINTER_ALIGN(value) \
645 (((value) + kDoubleAlignmentMask) & ~kDoubleAlignmentMask)
646
643 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk") 647 // Support for tracking C++ memory allocation. Insert TRACK_MEMORY("Fisk")
644 // inside a C++ class and new and delete will be overloaded so logging is 648 // inside a C++ class and new and delete will be overloaded so logging is
645 // performed. 649 // performed.
646 // This file (globals.h) is included before log.h, so we use direct calls to 650 // This file (globals.h) is included before log.h, so we use direct calls to
647 // the Logger rather than the LOG macro. 651 // the Logger rather than the LOG macro.
648 #ifdef DEBUG 652 #ifdef DEBUG
649 #define TRACK_MEMORY(name) \ 653 #define TRACK_MEMORY(name) \
650 void* operator new(size_t size) { \ 654 void* operator new(size_t size) { \
651 void* result = ::operator new(size); \ 655 void* result = ::operator new(size); \
652 Logger::NewEventStatic(name, result, size); \ 656 Logger::NewEventStatic(name, result, size); \
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { 947 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) {
944 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); 948 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral);
945 DCHECK(IsValidFunctionKind(kind)); 949 DCHECK(IsValidFunctionKind(kind));
946 return kind; 950 return kind;
947 } 951 }
948 } } // namespace v8::internal 952 } } // namespace v8::internal
949 953
950 namespace i = v8::internal; 954 namespace i = v8::internal;
951 955
952 #endif // V8_GLOBALS_H_ 956 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698