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

Side by Side Diff: src/globals.h

Issue 1640563004: Reland of "[heap] Parallel newspace evacuation, semispace copy, and compaction \o/" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Convert bogus DCHECK into proper branch Created 4 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 | « BUILD.gn ('k') | src/heap/array-buffer-tracker.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 #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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 DCHECK(IsValidFunctionKind(kind)); 1051 DCHECK(IsValidFunctionKind(kind));
1052 return kind & FunctionKind::kInObjectLiteral; 1052 return kind & FunctionKind::kInObjectLiteral;
1053 } 1053 }
1054 1054
1055 1055
1056 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { 1056 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) {
1057 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); 1057 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral);
1058 DCHECK(IsValidFunctionKind(kind)); 1058 DCHECK(IsValidFunctionKind(kind));
1059 return kind; 1059 return kind;
1060 } 1060 }
1061
1062 inline uint32_t ObjectHash(Address address) {
1063 // All objects are at least pointer aligned, so we can remove the trailing
1064 // zeros.
1065 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1066 kPointerSizeLog2);
1067 }
1068
1061 } // namespace internal 1069 } // namespace internal
1062 } // namespace v8 1070 } // namespace v8
1063 1071
1064 namespace i = v8::internal; 1072 namespace i = v8::internal;
1065 1073
1066 #endif // V8_GLOBALS_H_ 1074 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/heap/array-buffer-tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698