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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 virtual int GetCodeKind(); | 160 virtual int GetCodeKind(); |
161 | 161 |
162 // GenericBinaryOpStub needs to override this. | 162 // GenericBinaryOpStub needs to override this. |
163 virtual InlineCacheState GetICState() { | 163 virtual InlineCacheState GetICState() { |
164 return UNINITIALIZED; | 164 return UNINITIALIZED; |
165 } | 165 } |
166 | 166 |
167 // Returns a name for logging/debugging purposes. | 167 // Returns a name for logging/debugging purposes. |
168 virtual const char* GetName() { return MajorName(MajorKey(), false); } | 168 virtual const char* GetName() { return MajorName(MajorKey(), false); } |
169 | 169 |
170 #ifdef DEBUG | 170 // Returns whether the code generated for this stub needs to be allocated as |
| 171 // a fixed (non-moveable) code object. |
| 172 virtual bool NeedsImmovableCode() { return false; } |
| 173 |
| 174 #ifdef DEBUG |
171 virtual void Print() { PrintF("%s\n", GetName()); } | 175 virtual void Print() { PrintF("%s\n", GetName()); } |
172 #endif | 176 #endif |
173 | 177 |
174 // Computes the key based on major and minor. | 178 // Computes the key based on major and minor. |
175 uint32_t GetKey() { | 179 uint32_t GetKey() { |
176 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS); | 180 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS); |
177 return MinorKeyBits::encode(MinorKey()) | | 181 return MinorKeyBits::encode(MinorKey()) | |
178 MajorKeyBits::encode(MajorKey()); | 182 MajorKeyBits::encode(MajorKey()); |
179 } | 183 } |
180 | 184 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 void GenerateThrowUncatchable(MacroAssembler* masm, | 620 void GenerateThrowUncatchable(MacroAssembler* masm, |
617 UncatchableExceptionType type); | 621 UncatchableExceptionType type); |
618 | 622 |
619 // Number of pointers/values returned. | 623 // Number of pointers/values returned. |
620 const int result_size_; | 624 const int result_size_; |
621 bool save_doubles_; | 625 bool save_doubles_; |
622 | 626 |
623 Major MajorKey() { return CEntry; } | 627 Major MajorKey() { return CEntry; } |
624 int MinorKey(); | 628 int MinorKey(); |
625 | 629 |
| 630 bool NeedsImmovableCode(); |
| 631 |
626 const char* GetName() { return "CEntryStub"; } | 632 const char* GetName() { return "CEntryStub"; } |
627 }; | 633 }; |
628 | 634 |
629 | 635 |
630 class JSEntryStub : public CodeStub { | 636 class JSEntryStub : public CodeStub { |
631 public: | 637 public: |
632 JSEntryStub() { } | 638 JSEntryStub() { } |
633 | 639 |
634 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } | 640 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } |
635 | 641 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 private: | 947 private: |
942 MacroAssembler* masm_; | 948 MacroAssembler* masm_; |
943 bool previous_allow_; | 949 bool previous_allow_; |
944 | 950 |
945 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 951 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
946 }; | 952 }; |
947 | 953 |
948 } } // namespace v8::internal | 954 } } // namespace v8::internal |
949 | 955 |
950 #endif // V8_CODE_STUBS_H_ | 956 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |