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

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 more bugs 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
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 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 } 1112 }
1112 1113
1113 inline bool IsAsyncMethod(MethodKind kind) { return kind & MethodKind::Async; } 1114 inline bool IsAsyncMethod(MethodKind kind) { return kind & MethodKind::Async; }
1114 1115
1115 } // namespace internal 1116 } // namespace internal
1116 } // namespace v8 1117 } // namespace v8
1117 1118
1118 namespace i = v8::internal; 1119 namespace i = v8::internal;
1119 1120
1120 #endif // V8_GLOBALS_H_ 1121 #endif // V8_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698