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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 // JavaScript defines two kinds of 'nil'. | 600 // JavaScript defines two kinds of 'nil'. |
601 enum NilValue { kNullValue, kUndefinedValue }; | 601 enum NilValue { kNullValue, kUndefinedValue }; |
602 | 602 |
603 // ParseRestriction is used to restrict the set of valid statements in a | 603 // ParseRestriction is used to restrict the set of valid statements in a |
604 // unit of compilation. Restriction violations cause a syntax error. | 604 // unit of compilation. Restriction violations cause a syntax error. |
605 enum ParseRestriction { | 605 enum ParseRestriction { |
606 NO_PARSE_RESTRICTION, // All expressions are allowed. | 606 NO_PARSE_RESTRICTION, // All expressions are allowed. |
607 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. | 607 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. |
608 }; | 608 }; |
609 | 609 |
610 // TODO(gsathya): Move this to JSPromise once we create it. | |
611 // This should be in sync with the constants in promise.js | |
612 enum PromiseStatus { | |
613 kPromisePending, | |
614 kPromiseFulfilled, | |
615 kPromiseRejected, | |
616 }; | |
617 | |
618 // A CodeDesc describes a buffer holding instructions and relocation | 610 // A CodeDesc describes a buffer holding instructions and relocation |
619 // information. The instructions start at the beginning of the buffer | 611 // information. The instructions start at the beginning of the buffer |
620 // and grow forward, the relocation information starts at the end of | 612 // and grow forward, the relocation information starts at the end of |
621 // the buffer and grows backward. A constant pool may exist at the | 613 // the buffer and grows backward. A constant pool may exist at the |
622 // end of the instructions. | 614 // end of the instructions. |
623 // | 615 // |
624 // |<--------------- buffer_size ----------------------------------->| | 616 // |<--------------- buffer_size ----------------------------------->| |
625 // |<------------- instr_size ---------->| |<-- reloc_size -->| | 617 // |<------------- instr_size ---------->| |<-- reloc_size -->| |
626 // | |<- const_pool_size ->| | | 618 // | |<- const_pool_size ->| | |
627 // +=====================================+========+==================+ | 619 // +=====================================+========+==================+ |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 } // namespace internal | 1317 } // namespace internal |
1326 } // namespace v8 | 1318 } // namespace v8 |
1327 | 1319 |
1328 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is | 1320 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is |
1329 // reducing a JSArray method, or a JSTypedArray method. | 1321 // reducing a JSArray method, or a JSTypedArray method. |
1330 enum class ArrayIteratorKind { kArray, kTypedArray }; | 1322 enum class ArrayIteratorKind { kArray, kTypedArray }; |
1331 | 1323 |
1332 namespace i = v8::internal; | 1324 namespace i = v8::internal; |
1333 | 1325 |
1334 #endif // V8_GLOBALS_H_ | 1326 #endif // V8_GLOBALS_H_ |
OLD | NEW |