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 |
11 #include <ostream> | 11 #include <ostream> |
12 | 12 |
13 #include "src/base/build_config.h" | 13 #include "src/base/build_config.h" |
| 14 #include "src/base/flags.h" |
14 #include "src/base/logging.h" | 15 #include "src/base/logging.h" |
15 #include "src/base/macros.h" | 16 #include "src/base/macros.h" |
16 | 17 |
17 #ifdef V8_OS_WIN | 18 #ifdef V8_OS_WIN |
18 | 19 |
19 // Setup for Windows shared library export. | 20 // Setup for Windows shared library export. |
20 #ifdef BUILDING_V8_SHARED | 21 #ifdef BUILDING_V8_SHARED |
21 #define V8_EXPORT_PRIVATE __declspec(dllexport) | 22 #define V8_EXPORT_PRIVATE __declspec(dllexport) |
22 #elif USING_V8_SHARED | 23 #elif USING_V8_SHARED |
23 #define V8_EXPORT_PRIVATE __declspec(dllimport) | 24 #define V8_EXPORT_PRIVATE __declspec(dllimport) |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 return os << "IterationKind::kKeys"; | 1304 return os << "IterationKind::kKeys"; |
1304 case IterationKind::kValues: | 1305 case IterationKind::kValues: |
1305 return os << "IterationKind::kValues"; | 1306 return os << "IterationKind::kValues"; |
1306 case IterationKind::kEntries: | 1307 case IterationKind::kEntries: |
1307 return os << "IterationKind::kEntries"; | 1308 return os << "IterationKind::kEntries"; |
1308 } | 1309 } |
1309 UNREACHABLE(); | 1310 UNREACHABLE(); |
1310 return os; | 1311 return os; |
1311 } | 1312 } |
1312 | 1313 |
| 1314 // Flags for the runtime function kDefineDataPropertyInLiteral. A property can |
| 1315 // be enumerable or not, and, in case of functions, the function name |
| 1316 // can be set or not. |
| 1317 enum class DataPropertyInLiteralFlag { |
| 1318 kNoFlags = 0, |
| 1319 kDontEnum = 1 << 0, |
| 1320 kSetFunctionName = 1 << 1 |
| 1321 }; |
| 1322 typedef base::Flags<DataPropertyInLiteralFlag> DataPropertyInLiteralFlags; |
| 1323 DEFINE_OPERATORS_FOR_FLAGS(DataPropertyInLiteralFlags) |
| 1324 |
1313 } // namespace internal | 1325 } // namespace internal |
1314 } // namespace v8 | 1326 } // namespace v8 |
1315 | 1327 |
1316 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is | 1328 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is |
1317 // reducing a JSArray method, or a JSTypedArray method. | 1329 // reducing a JSArray method, or a JSTypedArray method. |
1318 enum class ArrayIteratorKind { kArray, kTypedArray }; | 1330 enum class ArrayIteratorKind { kArray, kTypedArray }; |
1319 | 1331 |
1320 namespace i = v8::internal; | 1332 namespace i = v8::internal; |
1321 | 1333 |
1322 #endif // V8_GLOBALS_H_ | 1334 #endif // V8_GLOBALS_H_ |
OLD | NEW |