Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Side by Side Diff: src/code-stubs.h

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports and perf bugfix Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 V(Instanceof) \ 59 V(Instanceof) \
60 V(ConvertToDouble) \ 60 V(ConvertToDouble) \
61 V(WriteInt32ToHeapNumber) \ 61 V(WriteInt32ToHeapNumber) \
62 V(StackCheck) \ 62 V(StackCheck) \
63 V(Interrupt) \ 63 V(Interrupt) \
64 V(FastNewClosure) \ 64 V(FastNewClosure) \
65 V(FastNewContext) \ 65 V(FastNewContext) \
66 V(FastNewBlockContext) \ 66 V(FastNewBlockContext) \
67 V(FastCloneShallowArray) \ 67 V(FastCloneShallowArray) \
68 V(FastCloneShallowObject) \ 68 V(FastCloneShallowObject) \
69 V(CreateAllocationSite) \
69 V(ToBoolean) \ 70 V(ToBoolean) \
70 V(ToNumber) \ 71 V(ToNumber) \
71 V(ArgumentsAccess) \ 72 V(ArgumentsAccess) \
72 V(RegExpConstructResult) \ 73 V(RegExpConstructResult) \
73 V(NumberToString) \ 74 V(NumberToString) \
74 V(CEntry) \ 75 V(CEntry) \
75 V(JSEntry) \ 76 V(JSEntry) \
76 V(KeyedLoadElement) \ 77 V(KeyedLoadElement) \
77 V(ArrayNoArgumentConstructor) \ 78 V(ArrayNoArgumentConstructor) \
78 V(ArraySingleArgumentConstructor) \ 79 V(ArraySingleArgumentConstructor) \
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 private: 614 private:
614 int length_; 615 int length_;
615 616
616 Major MajorKey() { return FastCloneShallowObject; } 617 Major MajorKey() { return FastCloneShallowObject; }
617 int NotMissMinorKey() { return length_; } 618 int NotMissMinorKey() { return length_; }
618 619
619 DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub); 620 DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub);
620 }; 621 };
621 622
622 623
624 class CreateAllocationSiteStub : public HydrogenCodeStub {
625 public:
626 explicit CreateAllocationSiteStub() { }
627
628 virtual Handle<Code> GenerateCode();
629
630 virtual bool IsPregenerated() { return true; }
631
632 static void GenerateAheadOfTime(Isolate* isolate);
633
634 virtual void InitializeInterfaceDescriptor(
635 Isolate* isolate,
636 CodeStubInterfaceDescriptor* descriptor);
637
638 private:
639 Major MajorKey() { return CreateAllocationSite; }
640 int NotMissMinorKey() { return 0; }
641
642 DISALLOW_COPY_AND_ASSIGN(CreateAllocationSiteStub);
643 };
644
645
623 class InstanceofStub: public PlatformCodeStub { 646 class InstanceofStub: public PlatformCodeStub {
624 public: 647 public:
625 enum Flags { 648 enum Flags {
626 kNoFlags = 0, 649 kNoFlags = 0,
627 kArgsInRegisters = 1 << 0, 650 kArgsInRegisters = 1 << 0,
628 kCallSiteInlineCheck = 1 << 1, 651 kCallSiteInlineCheck = 1 << 1,
629 kReturnTrueFalseObject = 1 << 2 652 kReturnTrueFalseObject = 1 << 2
630 }; 653 };
631 654
632 explicit InstanceofStub(Flags flags) : flags_(flags) { } 655 explicit InstanceofStub(Flags flags) : flags_(flags) { }
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 1771
1749 1772
1750 class ArrayConstructorStubBase : public HydrogenCodeStub { 1773 class ArrayConstructorStubBase : public HydrogenCodeStub {
1751 public: 1774 public:
1752 ArrayConstructorStubBase(ElementsKind kind, ContextCheckMode context_mode, 1775 ArrayConstructorStubBase(ElementsKind kind, ContextCheckMode context_mode,
1753 AllocationSiteOverrideMode override_mode) { 1776 AllocationSiteOverrideMode override_mode) {
1754 // It only makes sense to override local allocation site behavior 1777 // It only makes sense to override local allocation site behavior
1755 // if there is a difference between the global allocation site policy 1778 // if there is a difference between the global allocation site policy
1756 // for an ElementsKind and the desired usage of the stub. 1779 // for an ElementsKind and the desired usage of the stub.
1757 ASSERT(override_mode != DISABLE_ALLOCATION_SITES || 1780 ASSERT(override_mode != DISABLE_ALLOCATION_SITES ||
1758 AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); 1781 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE);
1759 bit_field_ = ElementsKindBits::encode(kind) | 1782 bit_field_ = ElementsKindBits::encode(kind) |
1760 AllocationSiteOverrideModeBits::encode(override_mode) | 1783 AllocationSiteOverrideModeBits::encode(override_mode) |
1761 ContextCheckModeBits::encode(context_mode); 1784 ContextCheckModeBits::encode(context_mode);
1762 } 1785 }
1763 1786
1764 ElementsKind elements_kind() const { 1787 ElementsKind elements_kind() const {
1765 return ElementsKindBits::decode(bit_field_); 1788 return ElementsKindBits::decode(bit_field_);
1766 } 1789 }
1767 1790
1768 AllocationSiteOverrideMode override_mode() const { 1791 AllocationSiteOverrideMode override_mode() const {
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 int MinorKey() { return 0; } 2199 int MinorKey() { return 0; }
2177 2200
2178 void Generate(MacroAssembler* masm); 2201 void Generate(MacroAssembler* masm);
2179 2202
2180 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2203 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2181 }; 2204 };
2182 2205
2183 } } // namespace v8::internal 2206 } } // namespace v8::internal
2184 2207
2185 #endif // V8_CODE_STUBS_H_ 2208 #endif // V8_CODE_STUBS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698