OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 20 matching lines...) Expand all Loading... |
31 #include "allocation.h" | 31 #include "allocation.h" |
32 #include "globals.h" | 32 #include "globals.h" |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 // List of code stubs used on all platforms. The order in this list is important | 37 // List of code stubs used on all platforms. The order in this list is important |
38 // as only the stubs up to and including Instanceof allows nested stub calls. | 38 // as only the stubs up to and including Instanceof allows nested stub calls. |
39 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ | 39 #define CODE_STUB_LIST_ALL_PLATFORMS(V) \ |
40 V(CallFunction) \ | 40 V(CallFunction) \ |
41 V(TypeRecordingUnaryOp) \ | 41 V(UnaryOp) \ |
42 V(TypeRecordingBinaryOp) \ | 42 V(BinaryOp) \ |
43 V(StringAdd) \ | 43 V(StringAdd) \ |
44 V(SubString) \ | 44 V(SubString) \ |
45 V(StringCompare) \ | 45 V(StringCompare) \ |
46 V(SmiOp) \ | 46 V(SmiOp) \ |
47 V(Compare) \ | 47 V(Compare) \ |
48 V(CompareIC) \ | 48 V(CompareIC) \ |
49 V(MathPow) \ | 49 V(MathPow) \ |
50 V(TranscendentalCache) \ | 50 V(TranscendentalCache) \ |
51 V(Instanceof) \ | 51 V(Instanceof) \ |
52 V(ConvertToDouble) \ | 52 V(ConvertToDouble) \ |
53 V(WriteInt32ToHeapNumber) \ | 53 V(WriteInt32ToHeapNumber) \ |
54 V(StackCheck) \ | 54 V(StackCheck) \ |
55 V(FastNewClosure) \ | 55 V(FastNewClosure) \ |
56 V(FastNewContext) \ | 56 V(FastNewContext) \ |
57 V(FastCloneShallowArray) \ | 57 V(FastCloneShallowArray) \ |
58 V(GenericUnaryOp) \ | |
59 V(RevertToNumber) \ | 58 V(RevertToNumber) \ |
60 V(ToBoolean) \ | 59 V(ToBoolean) \ |
61 V(ToNumber) \ | 60 V(ToNumber) \ |
62 V(CounterOp) \ | 61 V(CounterOp) \ |
63 V(ArgumentsAccess) \ | 62 V(ArgumentsAccess) \ |
64 V(RegExpExec) \ | 63 V(RegExpExec) \ |
65 V(RegExpConstructResult) \ | 64 V(RegExpConstructResult) \ |
66 V(NumberToString) \ | 65 V(NumberToString) \ |
67 V(CEntry) \ | 66 V(CEntry) \ |
68 V(JSEntry) \ | 67 V(JSEntry) \ |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 virtual void FinishCode(Code* code) { } | 162 virtual void FinishCode(Code* code) { } |
164 | 163 |
165 // Returns information for computing the number key. | 164 // Returns information for computing the number key. |
166 virtual Major MajorKey() = 0; | 165 virtual Major MajorKey() = 0; |
167 virtual int MinorKey() = 0; | 166 virtual int MinorKey() = 0; |
168 | 167 |
169 // The CallFunctionStub needs to override this so it can encode whether a | 168 // The CallFunctionStub needs to override this so it can encode whether a |
170 // lazily generated function should be fully optimized or not. | 169 // lazily generated function should be fully optimized or not. |
171 virtual InLoopFlag InLoop() { return NOT_IN_LOOP; } | 170 virtual InLoopFlag InLoop() { return NOT_IN_LOOP; } |
172 | 171 |
173 // TypeRecordingBinaryOpStub needs to override this. | 172 // BinaryOpStub needs to override this. |
174 virtual int GetCodeKind(); | 173 virtual int GetCodeKind(); |
175 | 174 |
176 // TypeRecordingBinaryOpStub needs to override this. | 175 // BinaryOpStub needs to override this. |
177 virtual InlineCacheState GetICState() { | 176 virtual InlineCacheState GetICState() { |
178 return UNINITIALIZED; | 177 return UNINITIALIZED; |
179 } | 178 } |
180 | 179 |
181 // Returns a name for logging/debugging purposes. | 180 // Returns a name for logging/debugging purposes. |
182 virtual const char* GetName() { return MajorName(MajorKey(), false); } | 181 virtual const char* GetName() { return MajorName(MajorKey(), false); } |
183 | 182 |
184 // Returns whether the code generated for this stub needs to be allocated as | 183 // Returns whether the code generated for this stub needs to be allocated as |
185 // a fixed (non-moveable) code object. | 184 // a fixed (non-moveable) code object. |
186 virtual bool NeedsImmovableCode() { return false; } | 185 virtual bool NeedsImmovableCode() { return false; } |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) | 1001 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) |
1003 | 1002 |
1004 protected: | 1003 protected: |
1005 ExternalArrayType array_type_; | 1004 ExternalArrayType array_type_; |
1006 }; | 1005 }; |
1007 | 1006 |
1008 | 1007 |
1009 } } // namespace v8::internal | 1008 } } // namespace v8::internal |
1010 | 1009 |
1011 #endif // V8_CODE_STUBS_H_ | 1010 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |