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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 // JavaScript defines two kinds of 'nil'. | 596 // JavaScript defines two kinds of 'nil'. |
597 enum NilValue { kNullValue, kUndefinedValue }; | 597 enum NilValue { kNullValue, kUndefinedValue }; |
598 | 598 |
599 // ParseRestriction is used to restrict the set of valid statements in a | 599 // ParseRestriction is used to restrict the set of valid statements in a |
600 // unit of compilation. Restriction violations cause a syntax error. | 600 // unit of compilation. Restriction violations cause a syntax error. |
601 enum ParseRestriction { | 601 enum ParseRestriction { |
602 NO_PARSE_RESTRICTION, // All expressions are allowed. | 602 NO_PARSE_RESTRICTION, // All expressions are allowed. |
603 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. | 603 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. |
604 }; | 604 }; |
605 | 605 |
606 // TODO(gsathya): Move this to JSPromise once we create it. | |
607 // This should be in sync with the constants in promise.js | |
608 enum PromiseStatus { | |
609 kPromisePending, | |
610 kPromiseFulfilled, | |
611 kPromiseRejected, | |
612 }; | |
613 | |
614 // A CodeDesc describes a buffer holding instructions and relocation | 606 // A CodeDesc describes a buffer holding instructions and relocation |
615 // information. The instructions start at the beginning of the buffer | 607 // information. The instructions start at the beginning of the buffer |
616 // and grow forward, the relocation information starts at the end of | 608 // and grow forward, the relocation information starts at the end of |
617 // the buffer and grows backward. A constant pool may exist at the | 609 // the buffer and grows backward. A constant pool may exist at the |
618 // end of the instructions. | 610 // end of the instructions. |
619 // | 611 // |
620 // |<--------------- buffer_size ----------------------------------->| | 612 // |<--------------- buffer_size ----------------------------------->| |
621 // |<------------- instr_size ---------->| |<-- reloc_size -->| | 613 // |<------------- instr_size ---------->| |<-- reloc_size -->| |
622 // | |<- const_pool_size ->| | | 614 // | |<- const_pool_size ->| | |
623 // +=====================================+========+==================+ | 615 // +=====================================+========+==================+ |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 UNREACHABLE(); | 1270 UNREACHABLE(); |
1279 return os; | 1271 return os; |
1280 } | 1272 } |
1281 | 1273 |
1282 } // namespace internal | 1274 } // namespace internal |
1283 } // namespace v8 | 1275 } // namespace v8 |
1284 | 1276 |
1285 namespace i = v8::internal; | 1277 namespace i = v8::internal; |
1286 | 1278 |
1287 #endif // V8_GLOBALS_H_ | 1279 #endif // V8_GLOBALS_H_ |
OLD | NEW |