| 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 }; | 732 }; |
| 733 | 733 |
| 734 | 734 |
| 735 class CallFunctionStub: public CodeStub { | 735 class CallFunctionStub: public CodeStub { |
| 736 public: | 736 public: |
| 737 CallFunctionStub(int argc, CallFunctionFlags flags) | 737 CallFunctionStub(int argc, CallFunctionFlags flags) |
| 738 : argc_(argc), flags_(flags) { } | 738 : argc_(argc), flags_(flags) { } |
| 739 | 739 |
| 740 void Generate(MacroAssembler* masm); | 740 void Generate(MacroAssembler* masm); |
| 741 | 741 |
| 742 virtual void FinishCode(Handle<Code> code) { |
| 743 code->set_has_function_cache(RecordCallTarget()); |
| 744 } |
| 745 |
| 742 static int ExtractArgcFromMinorKey(int minor_key) { | 746 static int ExtractArgcFromMinorKey(int minor_key) { |
| 743 return ArgcBits::decode(minor_key); | 747 return ArgcBits::decode(minor_key); |
| 744 } | 748 } |
| 745 | 749 |
| 746 private: | 750 private: |
| 747 int argc_; | 751 int argc_; |
| 748 CallFunctionFlags flags_; | 752 CallFunctionFlags flags_; |
| 749 | 753 |
| 750 virtual void PrintName(StringStream* stream); | 754 virtual void PrintName(StringStream* stream); |
| 751 | 755 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 768 } | 772 } |
| 769 }; | 773 }; |
| 770 | 774 |
| 771 | 775 |
| 772 class CallConstructStub: public CodeStub { | 776 class CallConstructStub: public CodeStub { |
| 773 public: | 777 public: |
| 774 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} | 778 explicit CallConstructStub(CallFunctionFlags flags) : flags_(flags) {} |
| 775 | 779 |
| 776 void Generate(MacroAssembler* masm); | 780 void Generate(MacroAssembler* masm); |
| 777 | 781 |
| 782 virtual void FinishCode(Handle<Code> code) { |
| 783 code->set_has_function_cache(RecordCallTarget()); |
| 784 } |
| 785 |
| 778 private: | 786 private: |
| 779 CallFunctionFlags flags_; | 787 CallFunctionFlags flags_; |
| 780 | 788 |
| 781 virtual void PrintName(StringStream* stream); | 789 virtual void PrintName(StringStream* stream); |
| 782 | 790 |
| 783 Major MajorKey() { return CallConstruct; } | 791 Major MajorKey() { return CallConstruct; } |
| 784 int MinorKey() { return flags_; } | 792 int MinorKey() { return flags_; } |
| 785 | 793 |
| 786 bool RecordCallTarget() { | 794 bool RecordCallTarget() { |
| 787 return (flags_ & RECORD_CALL_TARGET) != 0; | 795 return (flags_ & RECORD_CALL_TARGET) != 0; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 int MinorKey() { return 0; } | 1116 int MinorKey() { return 0; } |
| 1109 | 1117 |
| 1110 void Generate(MacroAssembler* masm); | 1118 void Generate(MacroAssembler* masm); |
| 1111 | 1119 |
| 1112 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); | 1120 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); |
| 1113 }; | 1121 }; |
| 1114 | 1122 |
| 1115 } } // namespace v8::internal | 1123 } } // namespace v8::internal |
| 1116 | 1124 |
| 1117 #endif // V8_CODE_STUBS_H_ | 1125 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |