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

Side by Side Diff: src/globals.h

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: fix some nits 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/factory.cc ('k') | src/js/harmony-async-await.js » ('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::kClassConstructor; 1052 return kind & FunctionKind::kClassConstructor;
1053 } 1053 }
1054 1054
1055 1055
1056 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) { 1056 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) {
1057 if (IsAccessorFunction(kind)) return false; 1057 if (IsAccessorFunction(kind)) return false;
1058 if (IsConciseMethod(kind)) return false; 1058 if (IsConciseMethod(kind)) return false;
1059 if (IsArrowFunction(kind)) return false; 1059 if (IsArrowFunction(kind)) return false;
1060 if (IsGeneratorFunction(kind)) return false; 1060 if (IsGeneratorFunction(kind)) return false;
1061 if (IsAsyncFunction(kind)) return false;
1061 return true; 1062 return true;
1062 } 1063 }
1063 1064
1064 1065
1065 inline uint32_t ObjectHash(Address address) { 1066 inline uint32_t ObjectHash(Address address) {
1066 // All objects are at least pointer aligned, so we can remove the trailing 1067 // All objects are at least pointer aligned, so we can remove the trailing
1067 // zeros. 1068 // zeros.
1068 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1069 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1069 kPointerSizeLog2); 1070 kPointerSizeLog2);
1070 } 1071 }
1071 1072
1072 } // namespace internal 1073 } // namespace internal
1073 } // namespace v8 1074 } // namespace v8
1074 1075
1075 namespace i = v8::internal; 1076 namespace i = v8::internal;
1076 1077
1077 #endif // V8_GLOBALS_H_ 1078 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/js/harmony-async-await.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698