OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 F(ExecuteInDebugContext, 2, 1) \ | 527 F(ExecuteInDebugContext, 2, 1) \ |
528 \ | 528 \ |
529 F(SetFlags, 1, 1) \ | 529 F(SetFlags, 1, 1) \ |
530 F(CollectGarbage, 1, 1) \ | 530 F(CollectGarbage, 1, 1) \ |
531 F(GetHeapUsage, 0, 1) \ | 531 F(GetHeapUsage, 0, 1) \ |
532 | 532 |
533 #else | 533 #else |
534 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) | 534 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) |
535 #endif | 535 #endif |
536 | 536 |
| 537 |
| 538 #ifdef V8_I18N_SUPPORT |
| 539 #define RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) \ |
| 540 /* i18n support */ \ |
| 541 /* Standalone, helper methods. */ \ |
| 542 F(CanonicalizeLanguageTag, 1, 1) \ |
| 543 F(AvailableLocalesOf, 1, 1) \ |
| 544 F(GetDefaultICULocale, 0, 1) \ |
| 545 F(GetLanguageTagVariants, 1, 1) \ |
| 546 |
| 547 #else |
| 548 #define RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) |
| 549 #endif |
| 550 |
| 551 |
537 #ifdef DEBUG | 552 #ifdef DEBUG |
538 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \ | 553 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \ |
539 /* Testing */ \ | 554 /* Testing */ \ |
540 F(ListNatives, 0, 1) | 555 F(ListNatives, 0, 1) |
541 #else | 556 #else |
542 #define RUNTIME_FUNCTION_LIST_DEBUG(F) | 557 #define RUNTIME_FUNCTION_LIST_DEBUG(F) |
543 #endif | 558 #endif |
544 | 559 |
545 // ---------------------------------------------------------------------------- | 560 // ---------------------------------------------------------------------------- |
546 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed | 561 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed |
547 // either directly by id (via the code generator), or indirectly | 562 // either directly by id (via the code generator), or indirectly |
548 // via a native call by name (from within JS code). | 563 // via a native call by name (from within JS code). |
549 | 564 |
550 #define RUNTIME_FUNCTION_LIST(F) \ | 565 #define RUNTIME_FUNCTION_LIST(F) \ |
551 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ | 566 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ |
552 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ | 567 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ |
553 RUNTIME_FUNCTION_LIST_DEBUG(F) \ | 568 RUNTIME_FUNCTION_LIST_DEBUG(F) \ |
554 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) | 569 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ |
| 570 RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) |
555 | 571 |
556 // ---------------------------------------------------------------------------- | 572 // ---------------------------------------------------------------------------- |
557 // INLINE_FUNCTION_LIST defines all inlined functions accessed | 573 // INLINE_FUNCTION_LIST defines all inlined functions accessed |
558 // with a native call of the form %_name from within JS code. | 574 // with a native call of the form %_name from within JS code. |
559 // Entries have the form F(name, number of arguments, number of return values). | 575 // Entries have the form F(name, number of arguments, number of return values). |
560 #define INLINE_FUNCTION_LIST(F) \ | 576 #define INLINE_FUNCTION_LIST(F) \ |
561 F(IsSmi, 1, 1) \ | 577 F(IsSmi, 1, 1) \ |
562 F(IsNonNegativeSmi, 1, 1) \ | 578 F(IsNonNegativeSmi, 1, 1) \ |
563 F(IsArray, 1, 1) \ | 579 F(IsArray, 1, 1) \ |
564 F(IsRegExp, 1, 1) \ | 580 F(IsRegExp, 1, 1) \ |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 //--------------------------------------------------------------------------- | 822 //--------------------------------------------------------------------------- |
807 // Constants used by interface to runtime functions. | 823 // Constants used by interface to runtime functions. |
808 | 824 |
809 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 825 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
810 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 826 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
811 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; | 827 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; |
812 | 828 |
813 } } // namespace v8::internal | 829 } } // namespace v8::internal |
814 | 830 |
815 #endif // V8_RUNTIME_H_ | 831 #endif // V8_RUNTIME_H_ |
OLD | NEW |