| 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 19 matching lines...) Expand all  Loading... | 
|   30  |   30  | 
|   31 #include "globals.h" |   31 #include "globals.h" | 
|   32  |   32  | 
|   33 namespace v8 { |   33 namespace v8 { | 
|   34 namespace internal { |   34 namespace internal { | 
|   35  |   35  | 
|   36 // List of code stubs used on all platforms. The order in this list is important |   36 // List of code stubs used on all platforms. The order in this list is important | 
|   37 // as only the stubs up to and including Instanceof allows nested stub calls. |   37 // as only the stubs up to and including Instanceof allows nested stub calls. | 
|   38 #define CODE_STUB_LIST_ALL_PLATFORMS(V)  \ |   38 #define CODE_STUB_LIST_ALL_PLATFORMS(V)  \ | 
|   39   V(CallFunction)                        \ |   39   V(CallFunction)                        \ | 
|   40   V(GenericBinaryOp)                     \ |  | 
|   41   V(TypeRecordingBinaryOp)               \ |   40   V(TypeRecordingBinaryOp)               \ | 
|   42   V(StringAdd)                           \ |   41   V(StringAdd)                           \ | 
|   43   V(SubString)                           \ |   42   V(SubString)                           \ | 
|   44   V(StringCompare)                       \ |   43   V(StringCompare)                       \ | 
|   45   V(SmiOp)                               \ |   44   V(SmiOp)                               \ | 
|   46   V(Compare)                             \ |   45   V(Compare)                             \ | 
|   47   V(CompareIC)                           \ |   46   V(CompareIC)                           \ | 
|   48   V(MathPow)                             \ |   47   V(MathPow)                             \ | 
|   49   V(TranscendentalCache)                 \ |   48   V(TranscendentalCache)                 \ | 
|   50   V(Instanceof)                          \ |   49   V(Instanceof)                          \ | 
|   51   V(ConvertToDouble)                     \ |   50   V(ConvertToDouble)                     \ | 
|   52   V(WriteInt32ToHeapNumber)              \ |   51   V(WriteInt32ToHeapNumber)              \ | 
|   53   V(IntegerMod)                          \ |  | 
|   54   V(StackCheck)                          \ |   52   V(StackCheck)                          \ | 
|   55   V(FastNewClosure)                      \ |   53   V(FastNewClosure)                      \ | 
|   56   V(FastNewContext)                      \ |   54   V(FastNewContext)                      \ | 
|   57   V(FastCloneShallowArray)               \ |   55   V(FastCloneShallowArray)               \ | 
|   58   V(GenericUnaryOp)                      \ |   56   V(GenericUnaryOp)                      \ | 
|   59   V(RevertToNumber)                      \ |   57   V(RevertToNumber)                      \ | 
|   60   V(ToBoolean)                           \ |   58   V(ToBoolean)                           \ | 
|   61   V(ToNumber)                            \ |   59   V(ToNumber)                            \ | 
|   62   V(CounterOp)                           \ |   60   V(CounterOp)                           \ | 
|   63   V(ArgumentsAccess)                     \ |   61   V(ArgumentsAccess)                     \ | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  157   virtual void FinishCode(Code* code) { } |  155   virtual void FinishCode(Code* code) { } | 
|  158  |  156  | 
|  159   // Returns information for computing the number key. |  157   // Returns information for computing the number key. | 
|  160   virtual Major MajorKey() = 0; |  158   virtual Major MajorKey() = 0; | 
|  161   virtual int MinorKey() = 0; |  159   virtual int MinorKey() = 0; | 
|  162  |  160  | 
|  163   // The CallFunctionStub needs to override this so it can encode whether a |  161   // The CallFunctionStub needs to override this so it can encode whether a | 
|  164   // lazily generated function should be fully optimized or not. |  162   // lazily generated function should be fully optimized or not. | 
|  165   virtual InLoopFlag InLoop() { return NOT_IN_LOOP; } |  163   virtual InLoopFlag InLoop() { return NOT_IN_LOOP; } | 
|  166  |  164  | 
|  167   // GenericBinaryOpStub needs to override this. |  165   // TypeRecordingBinaryOpStub needs to override this. | 
|  168   virtual int GetCodeKind(); |  166   virtual int GetCodeKind(); | 
|  169  |  167  | 
|  170   // GenericBinaryOpStub needs to override this. |  168   // TypeRecordingBinaryOpStub needs to override this. | 
|  171   virtual InlineCacheState GetICState() { |  169   virtual InlineCacheState GetICState() { | 
|  172     return UNINITIALIZED; |  170     return UNINITIALIZED; | 
|  173   } |  171   } | 
|  174  |  172  | 
|  175   // Returns a name for logging/debugging purposes. |  173   // Returns a name for logging/debugging purposes. | 
|  176   virtual const char* GetName() { return MajorName(MajorKey(), false); } |  174   virtual const char* GetName() { return MajorName(MajorKey(), false); } | 
|  177  |  175  | 
|  178   // Returns whether the code generated for this stub needs to be allocated as |  176   // Returns whether the code generated for this stub needs to be allocated as | 
|  179   // a fixed (non-moveable) code object. |  177   // a fixed (non-moveable) code object. | 
|  180   virtual bool NeedsImmovableCode() { return false; } |  178   virtual bool NeedsImmovableCode() { return false; } | 
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  962  private: |  960  private: | 
|  963   MacroAssembler* masm_; |  961   MacroAssembler* masm_; | 
|  964   bool previous_allow_; |  962   bool previous_allow_; | 
|  965  |  963  | 
|  966   DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |  964   DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 
|  967 }; |  965 }; | 
|  968  |  966  | 
|  969 } }  // namespace v8::internal |  967 } }  // namespace v8::internal | 
|  970  |  968  | 
|  971 #endif  // V8_CODE_STUBS_H_ |  969 #endif  // V8_CODE_STUBS_H_ | 
| OLD | NEW |