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

Side by Side Diff: src/globals.h

Issue 1943743003: Revert of [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/compiler/simplified-operator.cc ('k') | test/cctest/compiler/test-simplified-lowering.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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 const int kSpaceTagSize = 3; 445 const int kSpaceTagSize = 3;
446 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; 446 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1;
447 447
448 enum AllocationAlignment { 448 enum AllocationAlignment {
449 kWordAligned, 449 kWordAligned,
450 kDoubleAligned, 450 kDoubleAligned,
451 kDoubleUnaligned, 451 kDoubleUnaligned,
452 kSimd128Unaligned 452 kSimd128Unaligned
453 }; 453 };
454 454
455 // Supported write barrier modes.
456 enum WriteBarrierKind : uint8_t {
457 kNoWriteBarrier,
458 kMapWriteBarrier,
459 kPointerWriteBarrier,
460 kFullWriteBarrier
461 };
462
463 inline size_t hash_value(WriteBarrierKind kind) {
464 return static_cast<uint8_t>(kind);
465 }
466
467 inline std::ostream& operator<<(std::ostream& os, WriteBarrierKind kind) {
468 switch (kind) {
469 case kNoWriteBarrier:
470 return os << "NoWriteBarrier";
471 case kMapWriteBarrier:
472 return os << "MapWriteBarrier";
473 case kPointerWriteBarrier:
474 return os << "PointerWriteBarrier";
475 case kFullWriteBarrier:
476 return os << "FullWriteBarrier";
477 }
478 UNREACHABLE();
479 return os;
480 }
481
482 // A flag that indicates whether objects should be pretenured when 455 // A flag that indicates whether objects should be pretenured when
483 // allocated (allocated directly into the old generation) or not 456 // allocated (allocated directly into the old generation) or not
484 // (allocated in the young generation if the object size and type 457 // (allocated in the young generation if the object size and type
485 // allows). 458 // allows).
486 enum PretenureFlag { NOT_TENURED, TENURED }; 459 enum PretenureFlag { NOT_TENURED, TENURED };
487 460
488 inline std::ostream& operator<<(std::ostream& os, const PretenureFlag& flag) { 461 inline std::ostream& operator<<(std::ostream& os, const PretenureFlag& flag) {
489 switch (flag) { 462 switch (flag) {
490 case NOT_TENURED: 463 case NOT_TENURED:
491 return os << "NotTenured"; 464 return os << "NotTenured";
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1031 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1059 kPointerSizeLog2); 1032 kPointerSizeLog2);
1060 } 1033 }
1061 1034
1062 } // namespace internal 1035 } // namespace internal
1063 } // namespace v8 1036 } // namespace v8
1064 1037
1065 namespace i = v8::internal; 1038 namespace i = v8::internal;
1066 1039
1067 #endif // V8_GLOBALS_H_ 1040 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698