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

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

Issue 2113673002: [stubs]: Convert FastNewContext stub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename based on feedback Created 4 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
« no previous file with comments | « src/code-factory.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/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 /* HydrogenCodeStubs */ \ 56 /* HydrogenCodeStubs */ \
57 V(BinaryOpIC) \ 57 V(BinaryOpIC) \
58 V(BinaryOpWithAllocationSite) \ 58 V(BinaryOpWithAllocationSite) \
59 V(CreateAllocationSite) \ 59 V(CreateAllocationSite) \
60 V(CreateWeakCell) \ 60 V(CreateWeakCell) \
61 V(ElementsTransitionAndStore) \ 61 V(ElementsTransitionAndStore) \
62 V(FastArrayPush) \ 62 V(FastArrayPush) \
63 V(FastCloneRegExp) \ 63 V(FastCloneRegExp) \
64 V(FastCloneShallowArray) \ 64 V(FastCloneShallowArray) \
65 V(FastFunctionBind) \ 65 V(FastFunctionBind) \
66 V(FastNewContext) \
67 V(FastNewObject) \ 66 V(FastNewObject) \
68 V(FastNewRestParameter) \ 67 V(FastNewRestParameter) \
69 V(FastNewSloppyArguments) \ 68 V(FastNewSloppyArguments) \
70 V(FastNewStrictArguments) \ 69 V(FastNewStrictArguments) \
71 V(GrowArrayElements) \ 70 V(GrowArrayElements) \
72 V(KeyedLoadGeneric) \ 71 V(KeyedLoadGeneric) \
73 V(LoadScriptContextField) \ 72 V(LoadScriptContextField) \
74 V(LoadDictionaryElement) \ 73 V(LoadDictionaryElement) \
75 V(NameDictionaryLookup) \ 74 V(NameDictionaryLookup) \
76 V(NumberToString) \ 75 V(NumberToString) \
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 V(ShiftLeft) \ 110 V(ShiftLeft) \
112 V(BitwiseAnd) \ 111 V(BitwiseAnd) \
113 V(BitwiseOr) \ 112 V(BitwiseOr) \
114 V(BitwiseXor) \ 113 V(BitwiseXor) \
115 V(Inc) \ 114 V(Inc) \
116 V(InternalArrayNoArgumentConstructor) \ 115 V(InternalArrayNoArgumentConstructor) \
117 V(InternalArraySingleArgumentConstructor) \ 116 V(InternalArraySingleArgumentConstructor) \
118 V(Dec) \ 117 V(Dec) \
119 V(FastCloneShallowObject) \ 118 V(FastCloneShallowObject) \
120 V(FastNewClosure) \ 119 V(FastNewClosure) \
120 V(FastNewFunctionContext) \
121 V(InstanceOf) \ 121 V(InstanceOf) \
122 V(LessThan) \ 122 V(LessThan) \
123 V(LessThanOrEqual) \ 123 V(LessThanOrEqual) \
124 V(GreaterThan) \ 124 V(GreaterThan) \
125 V(GreaterThanOrEqual) \ 125 V(GreaterThanOrEqual) \
126 V(Equal) \ 126 V(Equal) \
127 V(NotEqual) \ 127 V(NotEqual) \
128 V(StrictEqual) \ 128 V(StrictEqual) \
129 V(StrictNotEqual) \ 129 V(StrictNotEqual) \
130 V(StringEqual) \ 130 V(StringEqual) \
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 1049 explicit FastNewClosureStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
1050 1050
1051 static compiler::Node* Generate(CodeStubAssembler* assembler, 1051 static compiler::Node* Generate(CodeStubAssembler* assembler,
1052 compiler::Node* shared_info, 1052 compiler::Node* shared_info,
1053 compiler::Node* context); 1053 compiler::Node* context);
1054 1054
1055 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure); 1055 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewClosure);
1056 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub); 1056 DEFINE_TURBOFAN_CODE_STUB(FastNewClosure, TurboFanCodeStub);
1057 }; 1057 };
1058 1058
1059 1059 class FastNewFunctionContextStub final : public TurboFanCodeStub {
1060 class FastNewContextStub final : public HydrogenCodeStub {
1061 public: 1060 public:
1062 static const int kMaximumSlots = 64; 1061 static const int kMaximumSlots = 64;
1063 1062
1064 FastNewContextStub(Isolate* isolate, int slots) : HydrogenCodeStub(isolate) { 1063 FastNewFunctionContextStub(Isolate* isolate, int slots)
1064 : TurboFanCodeStub(isolate) {
1065 DCHECK(slots >= 0 && slots <= kMaximumSlots); 1065 DCHECK(slots >= 0 && slots <= kMaximumSlots);
1066 set_sub_minor_key(SlotsBits::encode(slots)); 1066 minor_key_ = SlotsBits::encode(slots);
1067 } 1067 }
1068 1068
1069 int slots() const { return SlotsBits::decode(sub_minor_key()); } 1069 int slots() const { return SlotsBits::decode(minor_key_); }
1070
1071 // Parameters accessed via CodeStubGraphBuilder::GetParameter()
1072 static const int kFunction = 0;
1073 1070
1074 private: 1071 private:
1075 class SlotsBits : public BitField<int, 0, 8> {}; 1072 class SlotsBits : public BitField<int, 0, 8> {};
1076 1073
1077 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewContext); 1074 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewFunctionContext);
1078 DEFINE_HYDROGEN_CODE_STUB(FastNewContext, HydrogenCodeStub); 1075 DEFINE_TURBOFAN_CODE_STUB(FastNewFunctionContext, TurboFanCodeStub);
1079 }; 1076 };
1080 1077
1081 1078
1082 class FastNewObjectStub final : public PlatformCodeStub { 1079 class FastNewObjectStub final : public PlatformCodeStub {
1083 public: 1080 public:
1084 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 1081 explicit FastNewObjectStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
1085 1082
1086 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject); 1083 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewObject);
1087 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub); 1084 DEFINE_PLATFORM_CODE_STUB(FastNewObject, PlatformCodeStub);
1088 }; 1085 };
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
3112 #undef DEFINE_HYDROGEN_CODE_STUB 3109 #undef DEFINE_HYDROGEN_CODE_STUB
3113 #undef DEFINE_CODE_STUB 3110 #undef DEFINE_CODE_STUB
3114 #undef DEFINE_CODE_STUB_BASE 3111 #undef DEFINE_CODE_STUB_BASE
3115 3112
3116 extern Representation RepresentationFromType(Type* type); 3113 extern Representation RepresentationFromType(Type* type);
3117 3114
3118 } // namespace internal 3115 } // namespace internal
3119 } // namespace v8 3116 } // namespace v8
3120 3117
3121 #endif // V8_CODE_STUBS_H_ 3118 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698