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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 enum VisitMode { | 508 enum VisitMode { |
509 VISIT_ALL, | 509 VISIT_ALL, |
510 VISIT_ALL_IN_SCAVENGE, | 510 VISIT_ALL_IN_SCAVENGE, |
511 VISIT_ALL_IN_SWEEP_NEWSPACE, | 511 VISIT_ALL_IN_SWEEP_NEWSPACE, |
512 VISIT_ONLY_STRONG | 512 VISIT_ONLY_STRONG |
513 }; | 513 }; |
514 | 514 |
515 // Flag indicating whether code is built into the VM (one of the natives files). | 515 // Flag indicating whether code is built into the VM (one of the natives files). |
516 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; | 516 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; |
517 | 517 |
| 518 // JavaScript defines two kinds of 'nil'. |
| 519 enum NilValue { kNullValue, kUndefinedValue }; |
518 | 520 |
519 // ParseRestriction is used to restrict the set of valid statements in a | 521 // ParseRestriction is used to restrict the set of valid statements in a |
520 // unit of compilation. Restriction violations cause a syntax error. | 522 // unit of compilation. Restriction violations cause a syntax error. |
521 enum ParseRestriction { | 523 enum ParseRestriction { |
522 NO_PARSE_RESTRICTION, // All expressions are allowed. | 524 NO_PARSE_RESTRICTION, // All expressions are allowed. |
523 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. | 525 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. |
524 }; | 526 }; |
525 | 527 |
526 // A CodeDesc describes a buffer holding instructions and relocation | 528 // A CodeDesc describes a buffer holding instructions and relocation |
527 // information. The instructions start at the beginning of the buffer | 529 // information. The instructions start at the beginning of the buffer |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 1009 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |
1008 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 1010 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |
1009 DCHECK(IsValidFunctionKind(kind)); | 1011 DCHECK(IsValidFunctionKind(kind)); |
1010 return kind; | 1012 return kind; |
1011 } | 1013 } |
1012 } } // namespace v8::internal | 1014 } } // namespace v8::internal |
1013 | 1015 |
1014 namespace i = v8::internal; | 1016 namespace i = v8::internal; |
1015 | 1017 |
1016 #endif // V8_GLOBALS_H_ | 1018 #endif // V8_GLOBALS_H_ |
OLD | NEW |