| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
| 6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 740 |
| 741 InstanceofStub(Isolate* isolate, Flags flags) | 741 InstanceofStub(Isolate* isolate, Flags flags) |
| 742 : PlatformCodeStub(isolate), flags_(flags) { } | 742 : PlatformCodeStub(isolate), flags_(flags) { } |
| 743 | 743 |
| 744 static Register left(); | 744 static Register left(); |
| 745 static Register right(); | 745 static Register right(); |
| 746 | 746 |
| 747 void Generate(MacroAssembler* masm); | 747 void Generate(MacroAssembler* masm); |
| 748 | 748 |
| 749 virtual void InitializeInterfaceDescriptor( | 749 virtual void InitializeInterfaceDescriptor( |
| 750 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); | 750 CodeStubInterfaceDescriptor* descriptor); |
| 751 | 751 |
| 752 private: | 752 private: |
| 753 Major MajorKey() const { return Instanceof; } | 753 Major MajorKey() const { return Instanceof; } |
| 754 int MinorKey() const { return static_cast<int>(flags_); } | 754 int MinorKey() const { return static_cast<int>(flags_); } |
| 755 | 755 |
| 756 bool HasArgsInRegisters() const { | 756 bool HasArgsInRegisters() const { |
| 757 return (flags_ & kArgsInRegisters) != 0; | 757 return (flags_ & kArgsInRegisters) != 0; |
| 758 } | 758 } |
| 759 | 759 |
| 760 bool HasCallSiteInlineCheck() const { | 760 bool HasCallSiteInlineCheck() const { |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1621 ASSERT(argc <= Code::kMaxArguments); | 1621 ASSERT(argc <= Code::kMaxArguments); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 void Generate(MacroAssembler* masm); | 1624 void Generate(MacroAssembler* masm); |
| 1625 | 1625 |
| 1626 static int ExtractArgcFromMinorKey(int minor_key) { | 1626 static int ExtractArgcFromMinorKey(int minor_key) { |
| 1627 return ArgcBits::decode(minor_key); | 1627 return ArgcBits::decode(minor_key); |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 virtual void InitializeInterfaceDescriptor( | 1630 virtual void InitializeInterfaceDescriptor( |
| 1631 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); | 1631 CodeStubInterfaceDescriptor* descriptor); |
| 1632 | 1632 |
| 1633 private: | 1633 private: |
| 1634 int argc_; | 1634 int argc_; |
| 1635 CallFunctionFlags flags_; | 1635 CallFunctionFlags flags_; |
| 1636 | 1636 |
| 1637 virtual void PrintName(OStream& os) const V8_OVERRIDE; // NOLINT | 1637 virtual void PrintName(OStream& os) const V8_OVERRIDE; // NOLINT |
| 1638 | 1638 |
| 1639 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. | 1639 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. |
| 1640 class FlagBits: public BitField<CallFunctionFlags, 0, 2> {}; | 1640 class FlagBits: public BitField<CallFunctionFlags, 0, 2> {}; |
| 1641 class ArgcBits : public BitField<unsigned, 2, Code::kArgumentsBits> {}; | 1641 class ArgcBits : public BitField<unsigned, 2, Code::kArgumentsBits> {}; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1663 CallConstructStub(Isolate* isolate, CallConstructorFlags flags) | 1663 CallConstructStub(Isolate* isolate, CallConstructorFlags flags) |
| 1664 : PlatformCodeStub(isolate), flags_(flags) {} | 1664 : PlatformCodeStub(isolate), flags_(flags) {} |
| 1665 | 1665 |
| 1666 void Generate(MacroAssembler* masm); | 1666 void Generate(MacroAssembler* masm); |
| 1667 | 1667 |
| 1668 virtual void FinishCode(Handle<Code> code) { | 1668 virtual void FinishCode(Handle<Code> code) { |
| 1669 code->set_has_function_cache(RecordCallTarget()); | 1669 code->set_has_function_cache(RecordCallTarget()); |
| 1670 } | 1670 } |
| 1671 | 1671 |
| 1672 virtual void InitializeInterfaceDescriptor( | 1672 virtual void InitializeInterfaceDescriptor( |
| 1673 Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); | 1673 CodeStubInterfaceDescriptor* descriptor); |
| 1674 | 1674 |
| 1675 private: | 1675 private: |
| 1676 CallConstructorFlags flags_; | 1676 CallConstructorFlags flags_; |
| 1677 | 1677 |
| 1678 virtual void PrintName(OStream& os) const V8_OVERRIDE; // NOLINT | 1678 virtual void PrintName(OStream& os) const V8_OVERRIDE; // NOLINT |
| 1679 | 1679 |
| 1680 Major MajorKey() const { return CallConstruct; } | 1680 Major MajorKey() const { return CallConstruct; } |
| 1681 int MinorKey() const { return flags_; } | 1681 int MinorKey() const { return flags_; } |
| 1682 | 1682 |
| 1683 bool RecordCallTarget() const { | 1683 bool RecordCallTarget() const { |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 | 2540 |
| 2541 | 2541 |
| 2542 class CallDescriptors { | 2542 class CallDescriptors { |
| 2543 public: | 2543 public: |
| 2544 static void InitializeForIsolate(Isolate* isolate); | 2544 static void InitializeForIsolate(Isolate* isolate); |
| 2545 }; | 2545 }; |
| 2546 | 2546 |
| 2547 } } // namespace v8::internal | 2547 } } // namespace v8::internal |
| 2548 | 2548 |
| 2549 #endif // V8_CODE_STUBS_H_ | 2549 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |