| 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 |
| 606 // A CodeDesc describes a buffer holding instructions and relocation | 614 // A CodeDesc describes a buffer holding instructions and relocation |
| 607 // information. The instructions start at the beginning of the buffer | 615 // information. The instructions start at the beginning of the buffer |
| 608 // and grow forward, the relocation information starts at the end of | 616 // and grow forward, the relocation information starts at the end of |
| 609 // the buffer and grows backward. A constant pool may exist at the | 617 // the buffer and grows backward. A constant pool may exist at the |
| 610 // end of the instructions. | 618 // end of the instructions. |
| 611 // | 619 // |
| 612 // |<--------------- buffer_size ----------------------------------->| | 620 // |<--------------- buffer_size ----------------------------------->| |
| 613 // |<------------- instr_size ---------->| |<-- reloc_size -->| | 621 // |<------------- instr_size ---------->| |<-- reloc_size -->| |
| 614 // | |<- const_pool_size ->| | | 622 // | |<- const_pool_size ->| | |
| 615 // +=====================================+========+==================+ | 623 // +=====================================+========+==================+ |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 UNREACHABLE(); | 1278 UNREACHABLE(); |
| 1271 return os; | 1279 return os; |
| 1272 } | 1280 } |
| 1273 | 1281 |
| 1274 } // namespace internal | 1282 } // namespace internal |
| 1275 } // namespace v8 | 1283 } // namespace v8 |
| 1276 | 1284 |
| 1277 namespace i = v8::internal; | 1285 namespace i = v8::internal; |
| 1278 | 1286 |
| 1279 #endif // V8_GLOBALS_H_ | 1287 #endif // V8_GLOBALS_H_ |
| OLD | NEW |