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_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 class JavaScriptFrameIterator; // Forward declaration. | 765 class JavaScriptFrameIterator; // Forward declaration. |
766 | 766 |
767 | 767 |
768 class Runtime : public AllStatic { | 768 class Runtime : public AllStatic { |
769 public: | 769 public: |
770 enum FunctionId { | 770 enum FunctionId { |
771 #define F(name, nargs, ressize) k##name, | 771 #define F(name, nargs, ressize) k##name, |
772 RUNTIME_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F) | 772 RUNTIME_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F) |
773 #undef F | 773 #undef F |
774 #define F(name, nargs, ressize) kInline##name, | 774 #define F(name, nargs, ressize) kInline##name, |
775 INLINE_FUNCTION_LIST(F) | 775 INLINE_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F) |
776 #undef F | 776 #undef F |
777 #define F(name, nargs, ressize) kInlineOptimized##name, | 777 kNumFunctions, |
778 INLINE_OPTIMIZED_FUNCTION_LIST(F) | 778 // TODO(svenpanne) The values below are cruel hacks, remove them! |
779 #undef F | 779 kFirstInlineFunction = kInlineIsSmi, |
780 kNumFunctions, | 780 kLastInlineFunction = kInlineDebugIsActive |
781 kFirstInlineFunction = kInlineIsSmi | |
782 }; | 781 }; |
783 | 782 |
784 enum IntrinsicType { RUNTIME, INLINE, INLINE_OPTIMIZED }; | 783 enum IntrinsicType { RUNTIME, INLINE }; |
785 | 784 |
786 // Intrinsic function descriptor. | 785 // Intrinsic function descriptor. |
787 struct Function { | 786 struct Function { |
788 FunctionId function_id; | 787 FunctionId function_id; |
789 IntrinsicType intrinsic_type; | 788 IntrinsicType intrinsic_type; |
790 // The JS name of the function. | 789 // The JS name of the function. |
791 const char* name; | 790 const char* name; |
792 | 791 |
793 // The C++ (native) entry point. NULL if the function is inlined. | 792 // The C++ (native) entry point. NULL if the function is inlined. |
794 byte* entry; | 793 byte* entry; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 901 |
903 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 902 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
904 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 903 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
905 STATIC_ASSERT(LANGUAGE_END == 3); | 904 STATIC_ASSERT(LANGUAGE_END == 3); |
906 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; | 905 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; |
907 | 906 |
908 } // namespace internal | 907 } // namespace internal |
909 } // namespace v8 | 908 } // namespace v8 |
910 | 909 |
911 #endif // V8_RUNTIME_RUNTIME_H_ | 910 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |