OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 friend class BreakPointIterator; | 244 friend class BreakPointIterator; |
245 }; | 245 }; |
246 | 246 |
247 | 247 |
248 class PlatformCodeStub : public CodeStub { | 248 class PlatformCodeStub : public CodeStub { |
249 public: | 249 public: |
250 // Retrieve the code for the stub. Generate the code if needed. | 250 // Retrieve the code for the stub. Generate the code if needed. |
251 virtual Handle<Code> GenerateCode(); | 251 virtual Handle<Code> GenerateCode(); |
252 | 252 |
253 virtual int GetCodeKind() { return Code::STUB; } | 253 virtual int GetCodeKind() { return Code::STUB; } |
| 254 virtual int GetStubFlags() { return -1; } |
254 | 255 |
255 protected: | 256 protected: |
256 // Generates the assembler code for the stub. | 257 // Generates the assembler code for the stub. |
257 virtual void Generate(MacroAssembler* masm) = 0; | 258 virtual void Generate(MacroAssembler* masm) = 0; |
258 }; | 259 }; |
259 | 260 |
260 | 261 |
261 struct CodeStubInterfaceDescriptor { | 262 struct CodeStubInterfaceDescriptor { |
262 CodeStubInterfaceDescriptor() | 263 CodeStubInterfaceDescriptor() |
263 : register_param_count_(-1), | 264 : register_param_count_(-1), |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 virtual void Generate(MacroAssembler* masm); | 656 virtual void Generate(MacroAssembler* masm); |
656 | 657 |
657 private: | 658 private: |
658 virtual CodeStub::Major MajorKey() { return StoreArrayLength; } | 659 virtual CodeStub::Major MajorKey() { return StoreArrayLength; } |
659 }; | 660 }; |
660 | 661 |
661 | 662 |
662 class HandlerStub: public ICStub { | 663 class HandlerStub: public ICStub { |
663 public: | 664 public: |
664 explicit HandlerStub(Code::Kind kind) : ICStub(kind) { } | 665 explicit HandlerStub(Code::Kind kind) : ICStub(kind) { } |
665 | 666 virtual int GetCodeKind() { return Code::STUB; } |
666 protected: | 667 virtual int GetStubFlags() { return kind(); } |
667 virtual Code::ExtraICState GetExtraICState() { | |
668 return Code::HANDLER_FRAGMENT; | |
669 } | |
670 }; | 668 }; |
671 | 669 |
672 | 670 |
673 class LoadFieldStub: public HandlerStub { | 671 class LoadFieldStub: public HandlerStub { |
674 public: | 672 public: |
675 LoadFieldStub(Register reg, bool inobject, int index) | 673 LoadFieldStub(Register reg, bool inobject, int index) |
676 : HandlerStub(Code::LOAD_IC), | 674 : HandlerStub(Code::LOAD_IC), |
677 reg_(reg), | 675 reg_(reg), |
678 inobject_(inobject), | 676 inobject_(inobject), |
679 index_(index) { } | 677 index_(index) { } |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 | 1612 |
1615 // The current function entry hook. | 1613 // The current function entry hook. |
1616 static FunctionEntryHook entry_hook_; | 1614 static FunctionEntryHook entry_hook_; |
1617 | 1615 |
1618 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 1616 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
1619 }; | 1617 }; |
1620 | 1618 |
1621 } } // namespace v8::internal | 1619 } } // namespace v8::internal |
1622 | 1620 |
1623 #endif // V8_CODE_STUBS_H_ | 1621 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |