OLD | NEW |
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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 | 1091 |
1092 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) { | 1092 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) { |
1093 if (IsAccessorFunction(kind)) return false; | 1093 if (IsAccessorFunction(kind)) return false; |
1094 if (IsConciseMethod(kind)) return false; | 1094 if (IsConciseMethod(kind)) return false; |
1095 if (IsArrowFunction(kind)) return false; | 1095 if (IsArrowFunction(kind)) return false; |
1096 if (IsGeneratorFunction(kind)) return false; | 1096 if (IsGeneratorFunction(kind)) return false; |
1097 if (IsAsyncFunction(kind)) return false; | 1097 if (IsAsyncFunction(kind)) return false; |
1098 return true; | 1098 return true; |
1099 } | 1099 } |
1100 | 1100 |
| 1101 enum class CallableType : unsigned { kJSFunction, kAny }; |
1101 | 1102 |
1102 inline uint32_t ObjectHash(Address address) { | 1103 inline uint32_t ObjectHash(Address address) { |
1103 // All objects are at least pointer aligned, so we can remove the trailing | 1104 // All objects are at least pointer aligned, so we can remove the trailing |
1104 // zeros. | 1105 // zeros. |
1105 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1106 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1106 kPointerSizeLog2); | 1107 kPointerSizeLog2); |
1107 } | 1108 } |
1108 | 1109 |
1109 } // namespace internal | 1110 } // namespace internal |
1110 } // namespace v8 | 1111 } // namespace v8 |
1111 | 1112 |
1112 namespace i = v8::internal; | 1113 namespace i = v8::internal; |
1113 | 1114 |
1114 #endif // V8_GLOBALS_H_ | 1115 #endif // V8_GLOBALS_H_ |
OLD | NEW |