Chromium Code Reviews| 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 445 VISIT_ALL, | 445 VISIT_ALL, |
| 446 VISIT_ALL_IN_SCAVENGE, | 446 VISIT_ALL_IN_SCAVENGE, |
| 447 VISIT_ALL_IN_SWEEP_NEWSPACE, | 447 VISIT_ALL_IN_SWEEP_NEWSPACE, |
| 448 VISIT_ONLY_STRONG | 448 VISIT_ONLY_STRONG |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 // Flag indicating whether code is built into the VM (one of the natives files). | 451 // Flag indicating whether code is built into the VM (one of the natives files). |
| 452 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; | 452 enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; |
| 453 | 453 |
| 454 | 454 |
| 455 // ParseRestriction is used to restrict the set of valid statements in a | |
| 456 // unit of compilation. Restriction violations cause a syntax error. | |
| 457 enum ParseRestriction { | |
|
rossberg
2015/03/04 10:25:12
I don't think this belongs into global.h - it enco
titzer
2015/03/05 20:18:30
Michi argued strongly to keep the enum.
I initial
Michael Starzinger
2015/03/05 20:56:55
I argued strongly for "not turning it into a boole
| |
| 458 NO_PARSE_RESTRICTION, // All expressions are allowed. | |
| 459 ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. | |
| 460 }; | |
| 461 | |
| 455 // A CodeDesc describes a buffer holding instructions and relocation | 462 // A CodeDesc describes a buffer holding instructions and relocation |
| 456 // information. The instructions start at the beginning of the buffer | 463 // information. The instructions start at the beginning of the buffer |
| 457 // and grow forward, the relocation information starts at the end of | 464 // and grow forward, the relocation information starts at the end of |
| 458 // the buffer and grows backward. | 465 // the buffer and grows backward. |
| 459 // | 466 // |
| 460 // |<--------------- buffer_size ---------------->| | 467 // |<--------------- buffer_size ---------------->| |
| 461 // |<-- instr_size -->| |<-- reloc_size -->| | 468 // |<-- instr_size -->| |<-- reloc_size -->| |
| 462 // +==================+========+==================+ | 469 // +==================+========+==================+ |
| 463 // | instructions | free | reloc info | | 470 // | instructions | free | reloc info | |
| 464 // +==================+========+==================+ | 471 // +==================+========+==================+ |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 898 DCHECK(IsValidFunctionKind(kind)); | 905 DCHECK(IsValidFunctionKind(kind)); |
| 899 return kind & | 906 return kind & |
| 900 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | | 907 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | |
| 901 FunctionKind::kDefaultConstructor); | 908 FunctionKind::kDefaultConstructor); |
| 902 } | 909 } |
| 903 } } // namespace v8::internal | 910 } } // namespace v8::internal |
| 904 | 911 |
| 905 namespace i = v8::internal; | 912 namespace i = v8::internal; |
| 906 | 913 |
| 907 #endif // V8_GLOBALS_H_ | 914 #endif // V8_GLOBALS_H_ |
| OLD | NEW |