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

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

Issue 1109333003: Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ARM failure. Created 5 years, 7 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
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 V(BinaryOpIC) \ 62 V(BinaryOpIC) \
63 V(BinaryOpWithAllocationSite) \ 63 V(BinaryOpWithAllocationSite) \
64 V(CompareNilIC) \ 64 V(CompareNilIC) \
65 V(CreateAllocationSite) \ 65 V(CreateAllocationSite) \
66 V(CreateWeakCell) \ 66 V(CreateWeakCell) \
67 V(ElementsTransitionAndStore) \ 67 V(ElementsTransitionAndStore) \
68 V(FastCloneShallowArray) \ 68 V(FastCloneShallowArray) \
69 V(FastCloneShallowObject) \ 69 V(FastCloneShallowObject) \
70 V(FastNewClosure) \ 70 V(FastNewClosure) \
71 V(FastNewContext) \ 71 V(FastNewContext) \
72 V(GrowArrayElements) \
72 V(InternalArrayNArgumentsConstructor) \ 73 V(InternalArrayNArgumentsConstructor) \
73 V(InternalArrayNoArgumentConstructor) \ 74 V(InternalArrayNoArgumentConstructor) \
74 V(InternalArraySingleArgumentConstructor) \ 75 V(InternalArraySingleArgumentConstructor) \
75 V(KeyedLoadGeneric) \ 76 V(KeyedLoadGeneric) \
76 V(LoadScriptContextField) \ 77 V(LoadScriptContextField) \
77 V(LoadDictionaryElement) \ 78 V(LoadDictionaryElement) \
78 V(LoadFastElement) \ 79 V(LoadFastElement) \
79 V(MegamorphicLoad) \ 80 V(MegamorphicLoad) \
80 V(NameDictionaryLookup) \ 81 V(NameDictionaryLookup) \
81 V(NumberToString) \ 82 V(NumberToString) \
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 public: 703 public:
703 explicit CreateWeakCellStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} 704 explicit CreateWeakCellStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
704 705
705 static void GenerateAheadOfTime(Isolate* isolate); 706 static void GenerateAheadOfTime(Isolate* isolate);
706 707
707 DEFINE_CALL_INTERFACE_DESCRIPTOR(CreateWeakCell); 708 DEFINE_CALL_INTERFACE_DESCRIPTOR(CreateWeakCell);
708 DEFINE_HYDROGEN_CODE_STUB(CreateWeakCell, HydrogenCodeStub); 709 DEFINE_HYDROGEN_CODE_STUB(CreateWeakCell, HydrogenCodeStub);
709 }; 710 };
710 711
711 712
713 class GrowArrayElementsStub : public HydrogenCodeStub {
714 public:
715 GrowArrayElementsStub(Isolate* isolate, bool is_js_array, ElementsKind kind)
716 : HydrogenCodeStub(isolate) {
717 set_sub_minor_key(ElementsKindBits::encode(kind) |
718 IsJsArrayBits::encode(is_js_array));
719 }
720
721 ElementsKind elements_kind() const {
722 return ElementsKindBits::decode(sub_minor_key());
723 }
724
725 bool is_js_array() const { return IsJsArrayBits::decode(sub_minor_key()); }
726
727 private:
728 class ElementsKindBits : public BitField<ElementsKind, 0, 8> {};
729 class IsJsArrayBits : public BitField<bool, ElementsKindBits::kNext, 1> {};
730
731 DEFINE_CALL_INTERFACE_DESCRIPTOR(GrowArrayElements);
732 DEFINE_HYDROGEN_CODE_STUB(GrowArrayElements, HydrogenCodeStub);
733 };
734
712 class InstanceofStub: public PlatformCodeStub { 735 class InstanceofStub: public PlatformCodeStub {
713 public: 736 public:
714 enum Flags { 737 enum Flags {
715 kNoFlags = 0, 738 kNoFlags = 0,
716 kArgsInRegisters = 1 << 0, 739 kArgsInRegisters = 1 << 0,
717 kCallSiteInlineCheck = 1 << 1, 740 kCallSiteInlineCheck = 1 << 1,
718 kReturnTrueFalseObject = 1 << 2 741 kReturnTrueFalseObject = 1 << 2
719 }; 742 };
720 743
721 InstanceofStub(Isolate* isolate, Flags flags) : PlatformCodeStub(isolate) { 744 InstanceofStub(Isolate* isolate, Flags flags) : PlatformCodeStub(isolate) {
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 2820
2798 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2821 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2799 #undef DEFINE_PLATFORM_CODE_STUB 2822 #undef DEFINE_PLATFORM_CODE_STUB
2800 #undef DEFINE_HANDLER_CODE_STUB 2823 #undef DEFINE_HANDLER_CODE_STUB
2801 #undef DEFINE_HYDROGEN_CODE_STUB 2824 #undef DEFINE_HYDROGEN_CODE_STUB
2802 #undef DEFINE_CODE_STUB 2825 #undef DEFINE_CODE_STUB
2803 #undef DEFINE_CODE_STUB_BASE 2826 #undef DEFINE_CODE_STUB_BASE
2804 } } // namespace v8::internal 2827 } } // namespace v8::internal
2805 2828
2806 #endif // V8_CODE_STUBS_H_ 2829 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698