| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 F(HasFastProperties, 1, 1) \ | 422 F(HasFastProperties, 1, 1) \ |
| 423 F(TransitionElementsKind, 2, 1) \ | 423 F(TransitionElementsKind, 2, 1) \ |
| 424 F(HaveSameMap, 2, 1) \ | 424 F(HaveSameMap, 2, 1) \ |
| 425 F(IsJSGlobalProxy, 1, 1) \ | 425 F(IsJSGlobalProxy, 1, 1) \ |
| 426 F(ForInCacheArrayLength, 2, 1) /* TODO(turbofan): Only temporary */ | 426 F(ForInCacheArrayLength, 2, 1) /* TODO(turbofan): Only temporary */ |
| 427 | 427 |
| 428 | 428 |
| 429 #define RUNTIME_FUNCTION_LIST_ALWAYS_3(F) \ | 429 #define RUNTIME_FUNCTION_LIST_ALWAYS_3(F) \ |
| 430 /* String and Regexp */ \ | 430 /* String and Regexp */ \ |
| 431 F(NumberToStringRT, 1, 1) \ | 431 F(NumberToStringRT, 1, 1) \ |
| 432 F(RegExpConstructResult, 3, 1) \ | 432 F(RegExpConstructResultRT, 3, 1) \ |
| 433 F(RegExpExecRT, 4, 1) \ | 433 F(RegExpExecRT, 4, 1) \ |
| 434 F(StringAdd, 2, 1) \ | 434 F(StringAddRT, 2, 1) \ |
| 435 F(SubString, 3, 1) \ | 435 F(SubStringRT, 3, 1) \ |
| 436 F(InternalizeString, 1, 1) \ | 436 F(InternalizeString, 1, 1) \ |
| 437 F(StringCompare, 2, 1) \ | 437 F(StringCompareRT, 2, 1) \ |
| 438 F(StringCharCodeAtRT, 2, 1) \ | 438 F(StringCharCodeAtRT, 2, 1) \ |
| 439 F(GetFromCacheRT, 2, 1) \ | 439 F(GetFromCacheRT, 2, 1) \ |
| 440 \ | 440 \ |
| 441 /* Compilation */ \ | 441 /* Compilation */ \ |
| 442 F(CompileLazy, 1, 1) \ | 442 F(CompileLazy, 1, 1) \ |
| 443 F(CompileOptimized, 2, 1) \ | 443 F(CompileOptimized, 2, 1) \ |
| 444 F(TryInstallOptimizedCode, 1, 1) \ | 444 F(TryInstallOptimizedCode, 1, 1) \ |
| 445 F(NotifyDeoptimized, 1, 1) \ | 445 F(NotifyDeoptimized, 1, 1) \ |
| 446 F(NotifyStubFailure, 0, 1) \ | 446 F(NotifyStubFailure, 0, 1) \ |
| 447 \ | 447 \ |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 }; | 762 }; |
| 763 | 763 |
| 764 | 764 |
| 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 #define I(name, nargs, ressize) kInline##name, |
| 773 RUNTIME_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(F) |
| 774 INLINE_OPTIMIZED_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(I) |
| 775 INLINE_OPTIMIZED_FUNCTION_LIST(I) |
| 776 #undef I |
| 773 #undef F | 777 #undef F |
| 774 #define F(name, nargs, ressize) kInline##name, | 778 kNumFunctions, |
| 775 INLINE_FUNCTION_LIST(F) INLINE_OPTIMIZED_FUNCTION_LIST(F) | |
| 776 #undef F | |
| 777 kNumFunctions, | |
| 778 // TODO(svenpanne) The values below are cruel hacks, remove them! | 779 // TODO(svenpanne) The values below are cruel hacks, remove them! |
| 779 kFirstInlineFunction = kInlineIsSmi, | 780 kFirstInlineFunction = kInlineIsSmi, |
| 780 kLastInlineFunction = kInlineDebugIsActive | 781 kLastInlineFunction = kInlineDebugIsActive |
| 781 }; | 782 }; |
| 782 | 783 |
| 783 enum IntrinsicType { RUNTIME, INLINE }; | 784 enum IntrinsicType { RUNTIME, INLINE }; |
| 784 | 785 |
| 785 // Intrinsic function descriptor. | 786 // Intrinsic function descriptor. |
| 786 struct Function { | 787 struct Function { |
| 787 FunctionId function_id; | 788 FunctionId function_id; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 | 902 |
| 902 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; | 903 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; |
| 903 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; | 904 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; |
| 904 STATIC_ASSERT(LANGUAGE_END == 3); | 905 STATIC_ASSERT(LANGUAGE_END == 3); |
| 905 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; | 906 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; |
| 906 | 907 |
| 907 } // namespace internal | 908 } // namespace internal |
| 908 } // namespace v8 | 909 } // namespace v8 |
| 909 | 910 |
| 910 #endif // V8_RUNTIME_RUNTIME_H_ | 911 #endif // V8_RUNTIME_RUNTIME_H_ |
| OLD | NEW |