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_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_H_ |
6 #define V8_RUNTIME_H_ | 6 #define V8_RUNTIME_H_ |
7 | 7 |
8 #include "allocation.h" | 8 #include "allocation.h" |
9 #include "zone.h" | 9 #include "zone.h" |
10 | 10 |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 F(RegExpExec, 4, 1) \ | 655 F(RegExpExec, 4, 1) \ |
656 F(RegExpConstructResult, 3, 1) \ | 656 F(RegExpConstructResult, 3, 1) \ |
657 F(GetFromCache, 2, 1) \ | 657 F(GetFromCache, 2, 1) \ |
658 F(NumberToString, 1, 1) | 658 F(NumberToString, 1, 1) |
659 | 659 |
660 | 660 |
661 // ---------------------------------------------------------------------------- | 661 // ---------------------------------------------------------------------------- |
662 // INLINE_OPTIMIZED_FUNCTION_LIST defines all inlined functions accessed | 662 // INLINE_OPTIMIZED_FUNCTION_LIST defines all inlined functions accessed |
663 // with a native call of the form %_name from within JS code that also have | 663 // with a native call of the form %_name from within JS code that also have |
664 // a corresponding runtime function, that is called from non-optimized code. | 664 // a corresponding runtime function, that is called from non-optimized code. |
| 665 // For the benefit of (fuzz) tests, the runtime version can also be called |
| 666 // directly as %name (i.e. without the leading underscore). |
665 // Entries have the form F(name, number of arguments, number of return values). | 667 // Entries have the form F(name, number of arguments, number of return values). |
666 #define INLINE_OPTIMIZED_FUNCTION_LIST(F) \ | 668 #define INLINE_OPTIMIZED_FUNCTION_LIST(F) \ |
667 /* Typed Arrays */ \ | 669 /* Typed Arrays */ \ |
668 F(TypedArrayInitialize, 5, 1) \ | 670 F(TypedArrayInitialize, 5, 1) \ |
669 F(DataViewInitialize, 4, 1) \ | 671 F(DataViewInitialize, 4, 1) \ |
670 F(MaxSmi, 0, 1) \ | 672 F(MaxSmi, 0, 1) \ |
671 F(TypedArrayMaxSizeInHeap, 0, 1) \ | 673 F(TypedArrayMaxSizeInHeap, 0, 1) \ |
672 F(ArrayBufferViewGetByteLength, 1, 1) \ | 674 F(ArrayBufferViewGetByteLength, 1, 1) \ |
673 F(ArrayBufferViewGetByteOffset, 1, 1) \ | 675 F(ArrayBufferViewGetByteOffset, 1, 1) \ |
674 F(TypedArrayGetLength, 1, 1) \ | 676 F(TypedArrayGetLength, 1, 1) \ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 729 |
728 DISALLOW_COPY_AND_ASSIGN(RuntimeState); | 730 DISALLOW_COPY_AND_ASSIGN(RuntimeState); |
729 }; | 731 }; |
730 | 732 |
731 | 733 |
732 class Runtime : public AllStatic { | 734 class Runtime : public AllStatic { |
733 public: | 735 public: |
734 enum FunctionId { | 736 enum FunctionId { |
735 #define F(name, nargs, ressize) k##name, | 737 #define F(name, nargs, ressize) k##name, |
736 RUNTIME_FUNCTION_LIST(F) | 738 RUNTIME_FUNCTION_LIST(F) |
| 739 INLINE_OPTIMIZED_FUNCTION_LIST(F) |
737 #undef F | 740 #undef F |
738 #define F(name, nargs, ressize) kHidden##name, | 741 #define F(name, nargs, ressize) kHidden##name, |
739 RUNTIME_HIDDEN_FUNCTION_LIST(F) | 742 RUNTIME_HIDDEN_FUNCTION_LIST(F) |
740 #undef F | 743 #undef F |
741 #define F(name, nargs, ressize) kInline##name, | 744 #define F(name, nargs, ressize) kInline##name, |
742 INLINE_FUNCTION_LIST(F) | 745 INLINE_FUNCTION_LIST(F) |
743 #undef F | 746 #undef F |
744 #define F(name, nargs, ressize) kInlineOptimized##name, | 747 #define F(name, nargs, ressize) kInlineOptimized##name, |
745 INLINE_OPTIMIZED_FUNCTION_LIST(F) | 748 INLINE_OPTIMIZED_FUNCTION_LIST(F) |
746 #undef F | 749 #undef F |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 892 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
890 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 893 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
891 | 894 |
892 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 895 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
893 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 896 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
894 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 897 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
895 | 898 |
896 } } // namespace v8::internal | 899 } } // namespace v8::internal |
897 | 900 |
898 #endif // V8_RUNTIME_H_ | 901 #endif // V8_RUNTIME_H_ |
OLD | NEW |