OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 | 503 |
504 // Used to specify whether a receiver is implicitly or explicitly | 504 // Used to specify whether a receiver is implicitly or explicitly |
505 // provided to a call. | 505 // provided to a call. |
506 enum CallKind { | 506 enum CallKind { |
507 CALL_AS_METHOD, | 507 CALL_AS_METHOD, |
508 CALL_AS_FUNCTION | 508 CALL_AS_FUNCTION |
509 }; | 509 }; |
510 | 510 |
511 | 511 |
| 512 enum ScopeType { |
| 513 EVAL_SCOPE, // The top-level scope for an eval source. |
| 514 FUNCTION_SCOPE, // The top-level scope for a function. |
| 515 GLOBAL_SCOPE, // The top-level scope for a program or a top-level eval. |
| 516 CATCH_SCOPE, // The scope introduced by catch. |
| 517 BLOCK_SCOPE, // The scope introduced by a new block. |
| 518 WITH_SCOPE // The scope introduced by with. |
| 519 }; |
| 520 |
| 521 |
512 static const uint32_t kHoleNanUpper32 = 0x7FFFFFFF; | 522 static const uint32_t kHoleNanUpper32 = 0x7FFFFFFF; |
513 static const uint32_t kHoleNanLower32 = 0xFFFFFFFF; | 523 static const uint32_t kHoleNanLower32 = 0xFFFFFFFF; |
514 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; | 524 static const uint32_t kNaNOrInfinityLowerBoundUpper32 = 0x7FF00000; |
515 | 525 |
516 const uint64_t kHoleNanInt64 = | 526 const uint64_t kHoleNanInt64 = |
517 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; | 527 (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; |
518 const uint64_t kLastNonNaNInt64 = | 528 const uint64_t kLastNonNaNInt64 = |
519 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); | 529 (static_cast<uint64_t>(kNaNOrInfinityLowerBoundUpper32) << 32); |
520 | 530 |
521 | 531 |
522 enum VariableMode { | 532 enum VariableMode { |
523 // User declared variables: | 533 // User declared variables: |
524 VAR, // declared via 'var', and 'function' declarations | 534 VAR, // declared via 'var', and 'function' declarations |
525 | 535 |
526 CONST, // declared via 'const' declarations | 536 CONST, // declared via 'const' declarations |
527 | 537 |
528 LET, // declared via 'let' declarations | 538 CONST_HARMONY, // declared via 'const' declarations in harmony mode |
| 539 |
| 540 LET, // declared via 'let' declarations |
529 | 541 |
530 // Variables introduced by the compiler: | 542 // Variables introduced by the compiler: |
531 DYNAMIC, // always require dynamic lookup (we don't know | 543 DYNAMIC, // always require dynamic lookup (we don't know |
532 // the declaration) | 544 // the declaration) |
533 | 545 |
534 DYNAMIC_GLOBAL, // requires dynamic lookup, but we know that the | 546 DYNAMIC_GLOBAL, // requires dynamic lookup, but we know that the |
535 // variable is global unless it has been shadowed | 547 // variable is global unless it has been shadowed |
536 // by an eval-introduced variable | 548 // by an eval-introduced variable |
537 | 549 |
538 DYNAMIC_LOCAL, // requires dynamic lookup, but we know that the | 550 DYNAMIC_LOCAL, // requires dynamic lookup, but we know that the |
539 // variable is local and where it is unless it | 551 // variable is local and where it is unless it |
540 // has been shadowed by an eval-introduced | 552 // has been shadowed by an eval-introduced |
541 // variable | 553 // variable |
542 | 554 |
543 INTERNAL, // like VAR, but not user-visible (may or may not | 555 INTERNAL, // like VAR, but not user-visible (may or may not |
544 // be in a context) | 556 // be in a context) |
545 | 557 |
546 TEMPORARY // temporary variables (not user-visible), never | 558 TEMPORARY // temporary variables (not user-visible), never |
547 // in a context | 559 // in a context |
548 }; | 560 }; |
549 | 561 |
| 562 |
| 563 enum ClearExceptionFlag { |
| 564 KEEP_EXCEPTION, |
| 565 CLEAR_EXCEPTION |
| 566 }; |
| 567 |
| 568 |
550 } } // namespace v8::internal | 569 } } // namespace v8::internal |
551 | 570 |
552 #endif // V8_V8GLOBALS_H_ | 571 #endif // V8_V8GLOBALS_H_ |
OLD | NEW |