Chromium Code Reviews| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 F(ThrowNotDateError, 0, 1) \ | 145 F(ThrowNotDateError, 0, 1) \ |
| 146 F(DateCurrentTime, 0, 1) \ | 146 F(DateCurrentTime, 0, 1) \ |
| 147 F(DateParseString, 2, 1) \ | 147 F(DateParseString, 2, 1) \ |
| 148 F(DateLocalTimezone, 1, 1) \ | 148 F(DateLocalTimezone, 1, 1) \ |
| 149 F(DateToUTC, 1, 1) \ | 149 F(DateToUTC, 1, 1) \ |
| 150 F(DateCacheVersion, 0, 1) \ | 150 F(DateCacheVersion, 0, 1) \ |
| 151 F(DateField, 2 /* date object, field index */, 1) | 151 F(DateField, 2 /* date object, field index */, 1) |
| 152 | 152 |
| 153 | 153 |
| 154 #define FOR_EACH_INTRINSIC_DEBUG(F) \ | 154 #define FOR_EACH_INTRINSIC_DEBUG(F) \ |
| 155 F(HandleDebuggerStatement, 0, 1) \ | |
| 155 F(DebugBreak, 0, 1) \ | 156 F(DebugBreak, 0, 1) \ |
| 156 F(SetDebugEventListener, 2, 1) \ | 157 F(SetDebugEventListener, 2, 1) \ |
| 157 F(ScheduleBreak, 0, 1) \ | 158 F(ScheduleBreak, 0, 1) \ |
| 158 F(DebugGetInternalProperties, 1, 1) \ | 159 F(DebugGetInternalProperties, 1, 1) \ |
| 159 F(DebugGetPropertyDetails, 2, 1) \ | 160 F(DebugGetPropertyDetails, 2, 1) \ |
| 160 F(DebugGetProperty, 2, 1) \ | 161 F(DebugGetProperty, 2, 1) \ |
| 161 F(DebugPropertyTypeFromDetails, 1, 1) \ | 162 F(DebugPropertyTypeFromDetails, 1, 1) \ |
| 162 F(DebugPropertyAttributesFromDetails, 1, 1) \ | 163 F(DebugPropertyAttributesFromDetails, 1, 1) \ |
| 163 F(DebugPropertyIndexFromDetails, 1, 1) \ | 164 F(DebugPropertyIndexFromDetails, 1, 1) \ |
| 164 F(DebugNamedInterceptorPropertyValue, 2, 1) \ | 165 F(DebugNamedInterceptorPropertyValue, 2, 1) \ |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 718 #define FOR_EACH_INTRINSIC_URI(F) \ | 719 #define FOR_EACH_INTRINSIC_URI(F) \ |
| 719 F(URIEscape, 1, 1) \ | 720 F(URIEscape, 1, 1) \ |
| 720 F(URIUnescape, 1, 1) | 721 F(URIUnescape, 1, 1) |
| 721 | 722 |
| 722 | 723 |
| 723 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 724 #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
| 724 F(LoadLookupSlot, 2, 2) \ | 725 F(LoadLookupSlot, 2, 2) \ |
| 725 F(LoadLookupSlotNoReferenceError, 2, 2) | 726 F(LoadLookupSlotNoReferenceError, 2, 2) |
| 726 | 727 |
| 727 | 728 |
| 729 #define FOR_EACH_INTRINSIC_IC(F) \ | |
|
Michael Starzinger
2015/07/23 11:36:15
nit: Can we add a short one-line comment saying th
danno
2015/07/23 11:50:22
Done
| |
| 730 F(LoadIC_Miss, 3, 1) \ | |
| 731 F(KeyedLoadIC_Miss, 3, 1) \ | |
| 732 F(CallIC_Miss, 3, 1) \ | |
| 733 F(CallIC_Customization_Miss, 3, 1) \ | |
| 734 F(StoreIC_Miss, 3, 1) \ | |
| 735 F(StoreIC_Slow, 3, 1) \ | |
| 736 F(KeyedStoreIC_Miss, 3, 1) \ | |
| 737 F(KeyedStoreIC_Slow, 3, 1) \ | |
| 738 F(StoreCallbackProperty, 5, 1) \ | |
| 739 F(LoadPropertyWithInterceptorOnly, 4, 1) \ | |
| 740 F(LoadPropertyWithInterceptor, 3, 1) \ | |
| 741 F(LoadElementWithInterceptor, 2, 1) \ | |
| 742 F(StorePropertyWithInterceptor, 3, 1) \ | |
| 743 F(CompareIC_Miss, 3, 1) \ | |
| 744 F(BinaryOpIC_Miss, 2, 1) \ | |
| 745 F(CompareNilIC_Miss, 1, 1) \ | |
| 746 F(Unreachable, 0, 1) \ | |
| 747 F(ToBooleanIC_Miss, 1, 1) \ | |
| 748 F(KeyedLoadIC_MissFromStubFailure, 4, 1) \ | |
| 749 F(KeyedStoreIC_MissFromStubFailure, 3, 1) \ | |
| 750 F(StoreIC_MissFromStubFailure, 3, 1) \ | |
| 751 F(ElementsTransitionAndStoreIC_Miss, 4, 1) \ | |
| 752 F(BinaryOpIC_MissWithAllocationSite, 3, 1) \ | |
| 753 F(LoadIC_MissFromStubFailure, 0, 1) | |
| 754 | |
| 755 | |
| 728 #define FOR_EACH_INTRINSIC_RETURN_OBJECT(F) \ | 756 #define FOR_EACH_INTRINSIC_RETURN_OBJECT(F) \ |
| 757 FOR_EACH_INTRINSIC_IC(F) \ | |
| 729 FOR_EACH_INTRINSIC_ARRAY(F) \ | 758 FOR_EACH_INTRINSIC_ARRAY(F) \ |
| 730 FOR_EACH_INTRINSIC_ATOMICS(F) \ | 759 FOR_EACH_INTRINSIC_ATOMICS(F) \ |
| 731 FOR_EACH_INTRINSIC_CLASSES(F) \ | 760 FOR_EACH_INTRINSIC_CLASSES(F) \ |
| 732 FOR_EACH_INTRINSIC_COLLECTIONS(F) \ | 761 FOR_EACH_INTRINSIC_COLLECTIONS(F) \ |
| 733 FOR_EACH_INTRINSIC_COMPILER(F) \ | 762 FOR_EACH_INTRINSIC_COMPILER(F) \ |
| 734 FOR_EACH_INTRINSIC_DATE(F) \ | 763 FOR_EACH_INTRINSIC_DATE(F) \ |
| 735 FOR_EACH_INTRINSIC_DEBUG(F) \ | 764 FOR_EACH_INTRINSIC_DEBUG(F) \ |
| 736 FOR_EACH_INTRINSIC_FORIN(F) \ | 765 FOR_EACH_INTRINSIC_FORIN(F) \ |
| 737 FOR_EACH_INTRINSIC_FUNCTION(F) \ | 766 FOR_EACH_INTRINSIC_FUNCTION(F) \ |
| 738 FOR_EACH_INTRINSIC_FUTEX(F) \ | 767 FOR_EACH_INTRINSIC_FUTEX(F) \ |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 756 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ | 785 FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ |
| 757 FOR_EACH_INTRINSIC_URI(F) | 786 FOR_EACH_INTRINSIC_URI(F) |
| 758 | 787 |
| 759 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, | 788 // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors, |
| 760 // either returning an object or a pair. | 789 // either returning an object or a pair. |
| 761 #define FOR_EACH_INTRINSIC(F) \ | 790 #define FOR_EACH_INTRINSIC(F) \ |
| 762 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ | 791 FOR_EACH_INTRINSIC_RETURN_PAIR(F) \ |
| 763 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | 792 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
| 764 | 793 |
| 765 | 794 |
| 795 #define F(name, nargs, ressize) \ | |
| 796 Object* Runtime_##name(int args_length, Object** args_object, \ | |
| 797 Isolate* isolate); | |
| 798 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) | |
| 799 #undef F | |
| 800 | |
| 766 //--------------------------------------------------------------------------- | 801 //--------------------------------------------------------------------------- |
| 767 // Runtime provides access to all C++ runtime functions. | 802 // Runtime provides access to all C++ runtime functions. |
| 768 | 803 |
| 769 class RuntimeState { | 804 class RuntimeState { |
| 770 public: | 805 public: |
| 771 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() { | 806 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() { |
| 772 return &to_upper_mapping_; | 807 return &to_upper_mapping_; |
| 773 } | 808 } |
| 774 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { | 809 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() { |
| 775 return &to_lower_mapping_; | 810 return &to_lower_mapping_; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 954 inline bool Runtime::AtomicIsLockFree(uint32_t size) { | 989 inline bool Runtime::AtomicIsLockFree(uint32_t size) { |
| 955 return size == 1 || size == 2 || size == 4; | 990 return size == 1 || size == 2 || size == 4; |
| 956 } | 991 } |
| 957 | 992 |
| 958 #endif | 993 #endif |
| 959 | 994 |
| 960 } // namespace internal | 995 } // namespace internal |
| 961 } // namespace v8 | 996 } // namespace v8 |
| 962 | 997 |
| 963 #endif // V8_RUNTIME_RUNTIME_H_ | 998 #endif // V8_RUNTIME_RUNTIME_H_ |
| OLD | NEW |