| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 F(GetOptimizationCount, 1, 1) \ | 102 F(GetOptimizationCount, 1, 1) \ |
| 103 F(CompileForOnStackReplacement, 1, 1) \ | 103 F(CompileForOnStackReplacement, 1, 1) \ |
| 104 F(AllocateInNewSpace, 1, 1) \ | 104 F(AllocateInNewSpace, 1, 1) \ |
| 105 F(AllocateInOldPointerSpace, 1, 1) \ | 105 F(AllocateInOldPointerSpace, 1, 1) \ |
| 106 F(AllocateInOldDataSpace, 1, 1) \ | 106 F(AllocateInOldDataSpace, 1, 1) \ |
| 107 F(SetNativeFlag, 1, 1) \ | 107 F(SetNativeFlag, 1, 1) \ |
| 108 F(StoreArrayLiteralElement, 5, 1) \ | 108 F(StoreArrayLiteralElement, 5, 1) \ |
| 109 F(DebugCallbackSupportsStepping, 1, 1) \ | 109 F(DebugCallbackSupportsStepping, 1, 1) \ |
| 110 F(DebugPrepareStepInIfStepping, 1, 1) \ | 110 F(DebugPrepareStepInIfStepping, 1, 1) \ |
| 111 F(FlattenString, 1, 1) \ | 111 F(FlattenString, 1, 1) \ |
| 112 F(MigrateInstance, 1, 1) \ | |
| 113 \ | 112 \ |
| 114 /* Array join support */ \ | 113 /* Array join support */ \ |
| 115 F(PushIfAbsent, 2, 1) \ | 114 F(PushIfAbsent, 2, 1) \ |
| 116 F(ArrayConcat, 1, 1) \ | 115 F(ArrayConcat, 1, 1) \ |
| 117 \ | 116 \ |
| 118 /* Conversions */ \ | 117 /* Conversions */ \ |
| 119 F(ToBool, 1, 1) \ | 118 F(ToBool, 1, 1) \ |
| 120 F(Typeof, 1, 1) \ | 119 F(Typeof, 1, 1) \ |
| 121 \ | 120 \ |
| 122 F(StringToNumber, 1, 1) \ | 121 F(StringToNumber, 1, 1) \ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 151 \ | 150 \ |
| 152 F(StringAdd, 2, 1) \ | 151 F(StringAdd, 2, 1) \ |
| 153 F(StringBuilderConcat, 3, 1) \ | 152 F(StringBuilderConcat, 3, 1) \ |
| 154 F(StringBuilderJoin, 3, 1) \ | 153 F(StringBuilderJoin, 3, 1) \ |
| 155 F(SparseJoinWithSeparator, 3, 1) \ | 154 F(SparseJoinWithSeparator, 3, 1) \ |
| 156 \ | 155 \ |
| 157 /* Bit operations */ \ | 156 /* Bit operations */ \ |
| 158 F(NumberOr, 2, 1) \ | 157 F(NumberOr, 2, 1) \ |
| 159 F(NumberAnd, 2, 1) \ | 158 F(NumberAnd, 2, 1) \ |
| 160 F(NumberXor, 2, 1) \ | 159 F(NumberXor, 2, 1) \ |
| 160 F(NumberNot, 1, 1) \ |
| 161 \ | 161 \ |
| 162 F(NumberShl, 2, 1) \ | 162 F(NumberShl, 2, 1) \ |
| 163 F(NumberShr, 2, 1) \ | 163 F(NumberShr, 2, 1) \ |
| 164 F(NumberSar, 2, 1) \ | 164 F(NumberSar, 2, 1) \ |
| 165 \ | 165 \ |
| 166 /* Comparisons */ \ | 166 /* Comparisons */ \ |
| 167 F(NumberEquals, 2, 1) \ | 167 F(NumberEquals, 2, 1) \ |
| 168 F(StringEquals, 2, 1) \ | 168 F(StringEquals, 2, 1) \ |
| 169 \ | 169 \ |
| 170 F(NumberCompare, 3, 1) \ | 170 F(NumberCompare, 3, 1) \ |
| (...skipping 356 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 /* Date format and parse. */ \ | |
| 548 F(CreateDateTimeFormat, 3, 1) \ | |
| 549 F(InternalDateFormat, 2, 1) \ | |
| 550 F(InternalDateParse, 2, 1) \ | |
| 551 | |
| 552 #else | |
| 553 #define RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) | |
| 554 #endif | |
| 555 | |
| 556 | |
| 557 #ifdef DEBUG | 537 #ifdef DEBUG |
| 558 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \ | 538 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \ |
| 559 /* Testing */ \ | 539 /* Testing */ \ |
| 560 F(ListNatives, 0, 1) | 540 F(ListNatives, 0, 1) |
| 561 #else | 541 #else |
| 562 #define RUNTIME_FUNCTION_LIST_DEBUG(F) | 542 #define RUNTIME_FUNCTION_LIST_DEBUG(F) |
| 563 #endif | 543 #endif |
| 564 | 544 |
| 565 // ---------------------------------------------------------------------------- | 545 // ---------------------------------------------------------------------------- |
| 566 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed | 546 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed |
| 567 // either directly by id (via the code generator), or indirectly | 547 // either directly by id (via the code generator), or indirectly |
| 568 // via a native call by name (from within JS code). | 548 // via a native call by name (from within JS code). |
| 569 | 549 |
| 570 #define RUNTIME_FUNCTION_LIST(F) \ | 550 #define RUNTIME_FUNCTION_LIST(F) \ |
| 571 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ | 551 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ |
| 572 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ | 552 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ |
| 573 RUNTIME_FUNCTION_LIST_DEBUG(F) \ | 553 RUNTIME_FUNCTION_LIST_DEBUG(F) \ |
| 574 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ | 554 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) |
| 575 RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F) | |
| 576 | 555 |
| 577 // ---------------------------------------------------------------------------- | 556 // ---------------------------------------------------------------------------- |
| 578 // INLINE_FUNCTION_LIST defines all inlined functions accessed | 557 // INLINE_FUNCTION_LIST defines all inlined functions accessed |
| 579 // with a native call of the form %_name from within JS code. | 558 // with a native call of the form %_name from within JS code. |
| 580 // Entries have the form F(name, number of arguments, number of return values). | 559 // Entries have the form F(name, number of arguments, number of return values). |
| 581 #define INLINE_FUNCTION_LIST(F) \ | 560 #define INLINE_FUNCTION_LIST(F) \ |
| 582 F(IsSmi, 1, 1) \ | 561 F(IsSmi, 1, 1) \ |
| 583 F(IsNonNegativeSmi, 1, 1) \ | 562 F(IsNonNegativeSmi, 1, 1) \ |
| 584 F(IsArray, 1, 1) \ | 563 F(IsArray, 1, 1) \ |
| 585 F(IsRegExp, 1, 1) \ | 564 F(IsRegExp, 1, 1) \ |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 //--------------------------------------------------------------------------- | 806 //--------------------------------------------------------------------------- |
| 828 // Constants used by interface to runtime functions. | 807 // Constants used by interface to runtime functions. |
| 829 | 808 |
| 830 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 809 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 831 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 810 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 832 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; | 811 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; |
| 833 | 812 |
| 834 } } // namespace v8::internal | 813 } } // namespace v8::internal |
| 835 | 814 |
| 836 #endif // V8_RUNTIME_H_ | 815 #endif // V8_RUNTIME_H_ |
| OLD | NEW |