Line data Source code
1 : #include "src/builtins/builtins-utils-gen.h"
2 : #include "src/builtins/builtins.h"
3 : #include "src/code-factory.h"
4 : #include "src/elements-kind.h"
5 : #include "src/heap/factory-inl.h"
6 : #include "src/objects.h"
7 : #include "src/objects/arguments.h"
8 : #include "src/objects/bigint.h"
9 : #include "src/builtins/builtins-array-gen.h"
10 : #include "src/builtins/builtins-collections-gen.h"
11 : #include "src/builtins/builtins-data-view-gen.h"
12 : #include "src/builtins/builtins-iterator-gen.h"
13 : #include "src/builtins/builtins-typed-array-gen.h"
14 : #include "torque-generated/builtins-base-from-dsl-gen.h"
15 : #include "torque-generated/builtins-arguments-from-dsl-gen.h"
16 : #include "torque-generated/builtins-array-from-dsl-gen.h"
17 : #include "torque-generated/builtins-collections-from-dsl-gen.h"
18 : #include "torque-generated/builtins-data-view-from-dsl-gen.h"
19 : #include "torque-generated/builtins-extras-utils-from-dsl-gen.h"
20 : #include "torque-generated/builtins-object-from-dsl-gen.h"
21 : #include "torque-generated/builtins-iterator-from-dsl-gen.h"
22 : #include "torque-generated/builtins-typed-array-from-dsl-gen.h"
23 : #include "torque-generated/builtins-test-from-dsl-gen.h"
24 :
25 : namespace v8 {
26 : namespace internal {
27 :
28 168 : ArgumentsBuiltinsFromDSLAssembler::ArgumentsInfo ArgumentsBuiltinsFromDSLAssembler::GetArgumentsFrameAndCount(compiler::TNode<Context> p_context, compiler::TNode<JSFunction> p_f) {
29 168 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction> block0(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
30 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT> block5(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
31 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, RawPtrT> block4(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
32 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt> block3(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
33 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block8(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
34 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block6(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
35 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT> block2(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
36 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block11(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
37 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block9(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
38 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, BInt, BInt> block1(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
39 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, BInt, BInt> block12(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
40 : ca_.Goto(&block0, p_context, p_f);
41 :
42 168 : if (block0.is_used()) {
43 : compiler::TNode<Context> tmp0;
44 : compiler::TNode<JSFunction> tmp1;
45 : ca_.Bind(&block0, &tmp0, &tmp1);
46 : compiler::TNode<RawPtrT> tmp2;
47 : USE(tmp2);
48 336 : tmp2 = ca_.UncheckedCast<RawPtrT>(CodeStubAssembler(state_).LoadParentFramePointer());
49 : compiler::TNode<SharedFunctionInfo> tmp3;
50 : USE(tmp3);
51 504 : tmp3 = ca_.UncheckedCast<SharedFunctionInfo>(BaseBuiltinsFromDSLAssembler(state_).LoadJSFunctionSharedFunctionInfo(compiler::TNode<JSFunction>{tmp1}));
52 : compiler::TNode<Int32T> tmp4;
53 : USE(tmp4);
54 336 : tmp4 = ca_.UncheckedCast<Int32T>(CodeStubAssembler(state_).LoadSharedFunctionInfoFormalParameterCount(compiler::TNode<SharedFunctionInfo>{tmp3}));
55 : compiler::TNode<BInt> tmp5;
56 : USE(tmp5);
57 504 : tmp5 = ca_.UncheckedCast<BInt>(BaseBuiltinsFromDSLAssembler(state_).Convert6ATbint7ATint32(compiler::TNode<Int32T>{tmp4}));
58 : compiler::TNode<RawPtrT> tmp6;
59 : USE(tmp6);
60 504 : tmp6 = ca_.UncheckedCast<RawPtrT>(BaseBuiltinsFromDSLAssembler(state_).LoadCallerFromFrame(compiler::TNode<RawPtrT>{tmp2}));
61 : compiler::TNode<RawPtrT> tmp7;
62 : USE(tmp7);
63 : compiler::CodeAssemblerLabel label0(&ca_);
64 504 : tmp7 = BaseBuiltinsFromDSLAssembler(state_).Cast23ATArgumentsAdaptorFrame(compiler::TNode<Context>{tmp0}, compiler::TNode<RawPtrT>{tmp6}, &label0);
65 : ca_.Goto(&block4, tmp0, tmp1, tmp2, tmp3, tmp5, tmp5, tmp6, tmp7);
66 168 : if (label0.is_used()) {
67 168 : ca_.Bind(&label0);
68 : ca_.Goto(&block5, tmp0, tmp1, tmp2, tmp3, tmp5, tmp5, tmp6);
69 168 : }
70 : }
71 :
72 168 : if (block5.is_used()) {
73 : compiler::TNode<Context> tmp8;
74 : compiler::TNode<JSFunction> tmp9;
75 : compiler::TNode<RawPtrT> tmp10;
76 : compiler::TNode<SharedFunctionInfo> tmp11;
77 : compiler::TNode<BInt> tmp12;
78 : compiler::TNode<BInt> tmp13;
79 : compiler::TNode<RawPtrT> tmp14;
80 : ca_.Bind(&block5, &tmp8, &tmp9, &tmp10, &tmp11, &tmp12, &tmp13, &tmp14);
81 : ca_.Goto(&block3, tmp8, tmp9, tmp10, tmp11, tmp12, tmp13);
82 : }
83 :
84 168 : if (block4.is_used()) {
85 : compiler::TNode<Context> tmp15;
86 : compiler::TNode<JSFunction> tmp16;
87 : compiler::TNode<RawPtrT> tmp17;
88 : compiler::TNode<SharedFunctionInfo> tmp18;
89 : compiler::TNode<BInt> tmp19;
90 : compiler::TNode<BInt> tmp20;
91 : compiler::TNode<RawPtrT> tmp21;
92 : compiler::TNode<RawPtrT> tmp22;
93 : ca_.Bind(&block4, &tmp15, &tmp16, &tmp17, &tmp18, &tmp19, &tmp20, &tmp21, &tmp22);
94 : ca_.Goto(&block2, tmp15, tmp16, tmp17, tmp18, tmp19, tmp20, tmp22);
95 : }
96 :
97 168 : if (block3.is_used()) {
98 : compiler::TNode<Context> tmp23;
99 : compiler::TNode<JSFunction> tmp24;
100 : compiler::TNode<RawPtrT> tmp25;
101 : compiler::TNode<SharedFunctionInfo> tmp26;
102 : compiler::TNode<BInt> tmp27;
103 : compiler::TNode<BInt> tmp28;
104 : ca_.Bind(&block3, &tmp23, &tmp24, &tmp25, &tmp26, &tmp27, &tmp28);
105 : ca_.Goto(&block6, tmp23, tmp24, tmp25, tmp26, tmp27, tmp28, tmp25, tmp28, tmp27, tmp25, tmp28, tmp27, tmp25, tmp28, tmp27, tmp25, tmp28, tmp27);
106 : }
107 :
108 168 : if (block8.is_used()) {
109 : compiler::TNode<Context> tmp29;
110 : compiler::TNode<JSFunction> tmp30;
111 : compiler::TNode<RawPtrT> tmp31;
112 : compiler::TNode<SharedFunctionInfo> tmp32;
113 : compiler::TNode<BInt> tmp33;
114 : compiler::TNode<BInt> tmp34;
115 : compiler::TNode<RawPtrT> tmp35;
116 : compiler::TNode<BInt> tmp36;
117 : compiler::TNode<BInt> tmp37;
118 : compiler::TNode<RawPtrT> tmp38;
119 : compiler::TNode<BInt> tmp39;
120 : compiler::TNode<BInt> tmp40;
121 : compiler::TNode<RawPtrT> tmp41;
122 : compiler::TNode<BInt> tmp42;
123 : compiler::TNode<BInt> tmp43;
124 : ca_.Bind(&block8, &tmp29, &tmp30, &tmp31, &tmp32, &tmp33, &tmp34, &tmp35, &tmp36, &tmp37, &tmp38, &tmp39, &tmp40, &tmp41, &tmp42, &tmp43);
125 0 : CodeStubAssembler(state_).Unreachable();
126 : }
127 :
128 168 : if (block6.is_used()) {
129 : compiler::TNode<Context> tmp44;
130 : compiler::TNode<JSFunction> tmp45;
131 : compiler::TNode<RawPtrT> tmp46;
132 : compiler::TNode<SharedFunctionInfo> tmp47;
133 : compiler::TNode<BInt> tmp48;
134 : compiler::TNode<BInt> tmp49;
135 : compiler::TNode<RawPtrT> tmp50;
136 : compiler::TNode<BInt> tmp51;
137 : compiler::TNode<BInt> tmp52;
138 : compiler::TNode<RawPtrT> tmp53;
139 : compiler::TNode<BInt> tmp54;
140 : compiler::TNode<BInt> tmp55;
141 : compiler::TNode<RawPtrT> tmp56;
142 : compiler::TNode<BInt> tmp57;
143 : compiler::TNode<BInt> tmp58;
144 : compiler::TNode<RawPtrT> tmp59;
145 : compiler::TNode<BInt> tmp60;
146 : compiler::TNode<BInt> tmp61;
147 : ca_.Bind(&block6, &tmp44, &tmp45, &tmp46, &tmp47, &tmp48, &tmp49, &tmp50, &tmp51, &tmp52, &tmp53, &tmp54, &tmp55, &tmp56, &tmp57, &tmp58, &tmp59, &tmp60, &tmp61);
148 : ca_.Goto(&block1, tmp44, tmp45, tmp59, tmp60, tmp61);
149 : }
150 :
151 168 : if (block2.is_used()) {
152 : compiler::TNode<Context> tmp62;
153 : compiler::TNode<JSFunction> tmp63;
154 : compiler::TNode<RawPtrT> tmp64;
155 : compiler::TNode<SharedFunctionInfo> tmp65;
156 : compiler::TNode<BInt> tmp66;
157 : compiler::TNode<BInt> tmp67;
158 : compiler::TNode<RawPtrT> tmp68;
159 : ca_.Bind(&block2, &tmp62, &tmp63, &tmp64, &tmp65, &tmp66, &tmp67, &tmp68);
160 : compiler::TNode<Smi> tmp69;
161 : USE(tmp69);
162 504 : tmp69 = ca_.UncheckedCast<Smi>(BaseBuiltinsFromDSLAssembler(state_).LoadLengthFromAdapterFrame(compiler::TNode<Context>{tmp62}, compiler::TNode<RawPtrT>{tmp68}));
163 : compiler::TNode<BInt> tmp70;
164 : USE(tmp70);
165 504 : tmp70 = ca_.UncheckedCast<BInt>(BaseBuiltinsFromDSLAssembler(state_).Convert6ATbint5ATSmi(compiler::TNode<Smi>{tmp69}));
166 : ca_.Goto(&block9, tmp62, tmp63, tmp64, tmp65, tmp66, tmp67, tmp68, tmp68, tmp70, tmp66, tmp68, tmp70, tmp66, tmp68, tmp70, tmp66, tmp68, tmp70, tmp66);
167 : }
168 :
169 168 : if (block11.is_used()) {
170 : compiler::TNode<Context> tmp71;
171 : compiler::TNode<JSFunction> tmp72;
172 : compiler::TNode<RawPtrT> tmp73;
173 : compiler::TNode<SharedFunctionInfo> tmp74;
174 : compiler::TNode<BInt> tmp75;
175 : compiler::TNode<BInt> tmp76;
176 : compiler::TNode<RawPtrT> tmp77;
177 : compiler::TNode<RawPtrT> tmp78;
178 : compiler::TNode<BInt> tmp79;
179 : compiler::TNode<BInt> tmp80;
180 : compiler::TNode<RawPtrT> tmp81;
181 : compiler::TNode<BInt> tmp82;
182 : compiler::TNode<BInt> tmp83;
183 : compiler::TNode<RawPtrT> tmp84;
184 : compiler::TNode<BInt> tmp85;
185 : compiler::TNode<BInt> tmp86;
186 : ca_.Bind(&block11, &tmp71, &tmp72, &tmp73, &tmp74, &tmp75, &tmp76, &tmp77, &tmp78, &tmp79, &tmp80, &tmp81, &tmp82, &tmp83, &tmp84, &tmp85, &tmp86);
187 0 : CodeStubAssembler(state_).Unreachable();
188 : }
189 :
190 168 : if (block9.is_used()) {
191 : compiler::TNode<Context> tmp87;
192 : compiler::TNode<JSFunction> tmp88;
193 : compiler::TNode<RawPtrT> tmp89;
194 : compiler::TNode<SharedFunctionInfo> tmp90;
195 : compiler::TNode<BInt> tmp91;
196 : compiler::TNode<BInt> tmp92;
197 : compiler::TNode<RawPtrT> tmp93;
198 : compiler::TNode<RawPtrT> tmp94;
199 : compiler::TNode<BInt> tmp95;
200 : compiler::TNode<BInt> tmp96;
201 : compiler::TNode<RawPtrT> tmp97;
202 : compiler::TNode<BInt> tmp98;
203 : compiler::TNode<BInt> tmp99;
204 : compiler::TNode<RawPtrT> tmp100;
205 : compiler::TNode<BInt> tmp101;
206 : compiler::TNode<BInt> tmp102;
207 : compiler::TNode<RawPtrT> tmp103;
208 : compiler::TNode<BInt> tmp104;
209 : compiler::TNode<BInt> tmp105;
210 : ca_.Bind(&block9, &tmp87, &tmp88, &tmp89, &tmp90, &tmp91, &tmp92, &tmp93, &tmp94, &tmp95, &tmp96, &tmp97, &tmp98, &tmp99, &tmp100, &tmp101, &tmp102, &tmp103, &tmp104, &tmp105);
211 : ca_.Goto(&block1, tmp87, tmp88, tmp103, tmp104, tmp105);
212 : }
213 :
214 168 : if (block1.is_used()) {
215 : compiler::TNode<Context> tmp106;
216 : compiler::TNode<JSFunction> tmp107;
217 : compiler::TNode<RawPtrT> tmp108;
218 : compiler::TNode<BInt> tmp109;
219 : compiler::TNode<BInt> tmp110;
220 : ca_.Bind(&block1, &tmp106, &tmp107, &tmp108, &tmp109, &tmp110);
221 : ca_.Goto(&block12, tmp106, tmp107, tmp108, tmp109, tmp110);
222 : }
223 :
224 : compiler::TNode<Context> tmp111;
225 : compiler::TNode<JSFunction> tmp112;
226 : compiler::TNode<RawPtrT> tmp113;
227 : compiler::TNode<BInt> tmp114;
228 : compiler::TNode<BInt> tmp115;
229 : ca_.Bind(&block12, &tmp111, &tmp112, &tmp113, &tmp114, &tmp115);
230 336 : return ArgumentsBuiltinsFromDSLAssembler::ArgumentsInfo{compiler::TNode<RawPtrT>{tmp113}, compiler::TNode<BInt>{tmp114}, compiler::TNode<BInt>{tmp115}};
231 : }
232 :
233 : } // namespace internal
234 94089 : } // namespace v8
235 :
|