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-regexp-gen.h"
14 : #include "src/builtins/builtins-typed-array-gen.h"
15 : #include "src/builtins/builtins-constructor-gen.h"
16 : #include "torque-generated/builtins-base-from-dsl-gen.h"
17 : #include "torque-generated/builtins-arguments-from-dsl-gen.h"
18 : #include "torque-generated/builtins-array-from-dsl-gen.h"
19 : #include "torque-generated/builtins-array-copywithin-from-dsl-gen.h"
20 : #include "torque-generated/builtins-array-filter-from-dsl-gen.h"
21 : #include "torque-generated/builtins-array-foreach-from-dsl-gen.h"
22 : #include "torque-generated/builtins-array-join-from-dsl-gen.h"
23 : #include "torque-generated/builtins-array-lastindexof-from-dsl-gen.h"
24 : #include "torque-generated/builtins-array-of-from-dsl-gen.h"
25 : #include "torque-generated/builtins-array-map-from-dsl-gen.h"
26 : #include "torque-generated/builtins-array-reverse-from-dsl-gen.h"
27 : #include "torque-generated/builtins-array-slice-from-dsl-gen.h"
28 : #include "torque-generated/builtins-array-splice-from-dsl-gen.h"
29 : #include "torque-generated/builtins-array-unshift-from-dsl-gen.h"
30 : #include "torque-generated/builtins-collections-from-dsl-gen.h"
31 : #include "torque-generated/builtins-data-view-from-dsl-gen.h"
32 : #include "torque-generated/builtins-extras-utils-from-dsl-gen.h"
33 : #include "torque-generated/builtins-object-from-dsl-gen.h"
34 : #include "torque-generated/builtins-iterator-from-dsl-gen.h"
35 : #include "torque-generated/builtins-string-from-dsl-gen.h"
36 : #include "torque-generated/builtins-typed-array-from-dsl-gen.h"
37 : #include "torque-generated/builtins-typed-array-createtypedarray-from-dsl-gen.h"
38 : #include "torque-generated/builtins-test-from-dsl-gen.h"
39 :
40 : namespace v8 {
41 : namespace internal {
42 :
43 168 : ArgumentsBuiltinsFromDSLAssembler::ArgumentsInfo ArgumentsBuiltinsFromDSLAssembler::GetArgumentsFrameAndCount(compiler::TNode<Context> p_context, compiler::TNode<JSFunction> p_f) {
44 168 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction> block0(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
45 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT> block5(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
46 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, RawPtrT> block4(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
47 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt> block3(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
48 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block6(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
49 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT> block2(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
50 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, SharedFunctionInfo, BInt, BInt, RawPtrT, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt, RawPtrT, BInt, BInt> block7(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
51 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, BInt, BInt> block1(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
52 336 : compiler::CodeAssemblerParameterizedLabel<Context, JSFunction, RawPtrT, BInt, BInt> block8(&ca_, compiler::CodeAssemblerLabel::kNonDeferred);
53 168 : ca_.Goto(&block0, p_context, p_f);
54 :
55 168 : if (block0.is_used()) {
56 168 : compiler::TNode<Context> tmp0;
57 168 : compiler::TNode<JSFunction> tmp1;
58 168 : ca_.Bind(&block0, &tmp0, &tmp1);
59 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 26);
60 168 : compiler::TNode<RawPtrT> tmp2;
61 168 : USE(tmp2);
62 168 : tmp2 = ca_.UncheckedCast<RawPtrT>(CodeStubAssembler(state_).LoadParentFramePointer());
63 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 29);
64 168 : compiler::TNode<SharedFunctionInfo> tmp3;
65 168 : USE(tmp3);
66 168 : tmp3 = ca_.UncheckedCast<SharedFunctionInfo>(BaseBuiltinsFromDSLAssembler(state_).LoadJSFunctionSharedFunctionInfo(compiler::TNode<JSFunction>{tmp1}));
67 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 31);
68 168 : compiler::TNode<Uint32T> tmp4;
69 168 : USE(tmp4);
70 168 : tmp4 = ca_.UncheckedCast<Uint32T>(BaseBuiltinsFromDSLAssembler(state_).LoadSharedFunctionInfoFormalParameterCount(compiler::TNode<SharedFunctionInfo>{tmp3}));
71 168 : compiler::TNode<Int32T> tmp5;
72 168 : USE(tmp5);
73 168 : tmp5 = ca_.UncheckedCast<Int32T>(BaseBuiltinsFromDSLAssembler(state_).Convert7ATint328ATuint16(compiler::TNode<Uint32T>{tmp4}));
74 168 : compiler::TNode<BInt> tmp6;
75 168 : USE(tmp6);
76 168 : tmp6 = ca_.UncheckedCast<BInt>(BaseBuiltinsFromDSLAssembler(state_).Convert6ATbint7ATint32(compiler::TNode<Int32T>{tmp5}));
77 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 30);
78 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 32);
79 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 35);
80 168 : compiler::TNode<RawPtrT> tmp7;
81 168 : USE(tmp7);
82 168 : tmp7 = ca_.UncheckedCast<RawPtrT>(BaseBuiltinsFromDSLAssembler(state_).LoadCallerFromFrame(compiler::TNode<RawPtrT>{tmp2}));
83 168 : compiler::TNode<RawPtrT> tmp8;
84 168 : USE(tmp8);
85 168 : compiler::CodeAssemblerLabel label0(&ca_);
86 168 : tmp8 = BaseBuiltinsFromDSLAssembler(state_).Cast23ATArgumentsAdaptorFrame(compiler::TNode<Context>{tmp0}, compiler::TNode<RawPtrT>{tmp7}, &label0);
87 168 : ca_.Goto(&block4, tmp0, tmp1, tmp2, tmp3, tmp6, tmp6, tmp7, tmp8);
88 168 : if (label0.is_used()) {
89 168 : ca_.Bind(&label0);
90 168 : ca_.Goto(&block5, tmp0, tmp1, tmp2, tmp3, tmp6, tmp6, tmp7);
91 168 : }
92 : }
93 :
94 168 : if (block5.is_used()) {
95 168 : compiler::TNode<Context> tmp9;
96 168 : compiler::TNode<JSFunction> tmp10;
97 168 : compiler::TNode<RawPtrT> tmp11;
98 168 : compiler::TNode<SharedFunctionInfo> tmp12;
99 168 : compiler::TNode<BInt> tmp13;
100 168 : compiler::TNode<BInt> tmp14;
101 168 : compiler::TNode<RawPtrT> tmp15;
102 168 : ca_.Bind(&block5, &tmp9, &tmp10, &tmp11, &tmp12, &tmp13, &tmp14, &tmp15);
103 168 : ca_.Goto(&block3, tmp9, tmp10, tmp11, tmp12, tmp13, tmp14);
104 : }
105 :
106 168 : if (block4.is_used()) {
107 168 : compiler::TNode<Context> tmp16;
108 168 : compiler::TNode<JSFunction> tmp17;
109 168 : compiler::TNode<RawPtrT> tmp18;
110 168 : compiler::TNode<SharedFunctionInfo> tmp19;
111 168 : compiler::TNode<BInt> tmp20;
112 168 : compiler::TNode<BInt> tmp21;
113 168 : compiler::TNode<RawPtrT> tmp22;
114 168 : compiler::TNode<RawPtrT> tmp23;
115 168 : ca_.Bind(&block4, &tmp16, &tmp17, &tmp18, &tmp19, &tmp20, &tmp21, &tmp22, &tmp23);
116 168 : ca_.Goto(&block2, tmp16, tmp17, tmp18, tmp19, tmp20, tmp21, tmp23);
117 : }
118 :
119 168 : if (block3.is_used()) {
120 168 : compiler::TNode<Context> tmp24;
121 168 : compiler::TNode<JSFunction> tmp25;
122 168 : compiler::TNode<RawPtrT> tmp26;
123 168 : compiler::TNode<SharedFunctionInfo> tmp27;
124 168 : compiler::TNode<BInt> tmp28;
125 168 : compiler::TNode<BInt> tmp29;
126 168 : ca_.Bind(&block3, &tmp24, &tmp25, &tmp26, &tmp27, &tmp28, &tmp29);
127 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 36);
128 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 7);
129 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 36);
130 168 : ca_.Goto(&block6, tmp24, tmp25, tmp26, tmp27, tmp28, tmp29, tmp26, tmp29, tmp28, tmp26, tmp29, tmp28, tmp26, tmp29, tmp28);
131 : }
132 :
133 168 : if (block6.is_used()) {
134 168 : compiler::TNode<Context> tmp30;
135 168 : compiler::TNode<JSFunction> tmp31;
136 168 : compiler::TNode<RawPtrT> tmp32;
137 168 : compiler::TNode<SharedFunctionInfo> tmp33;
138 168 : compiler::TNode<BInt> tmp34;
139 168 : compiler::TNode<BInt> tmp35;
140 168 : compiler::TNode<RawPtrT> tmp36;
141 168 : compiler::TNode<BInt> tmp37;
142 168 : compiler::TNode<BInt> tmp38;
143 168 : compiler::TNode<RawPtrT> tmp39;
144 168 : compiler::TNode<BInt> tmp40;
145 168 : compiler::TNode<BInt> tmp41;
146 168 : compiler::TNode<RawPtrT> tmp42;
147 168 : compiler::TNode<BInt> tmp43;
148 168 : compiler::TNode<BInt> tmp44;
149 168 : ca_.Bind(&block6, &tmp30, &tmp31, &tmp32, &tmp33, &tmp34, &tmp35, &tmp36, &tmp37, &tmp38, &tmp39, &tmp40, &tmp41, &tmp42, &tmp43, &tmp44);
150 168 : ca_.Goto(&block1, tmp30, tmp31, tmp36, tmp37, tmp38);
151 : }
152 :
153 168 : if (block2.is_used()) {
154 168 : compiler::TNode<Context> tmp45;
155 168 : compiler::TNode<JSFunction> tmp46;
156 168 : compiler::TNode<RawPtrT> tmp47;
157 168 : compiler::TNode<SharedFunctionInfo> tmp48;
158 168 : compiler::TNode<BInt> tmp49;
159 168 : compiler::TNode<BInt> tmp50;
160 168 : compiler::TNode<RawPtrT> tmp51;
161 168 : ca_.Bind(&block2, &tmp45, &tmp46, &tmp47, &tmp48, &tmp49, &tmp50, &tmp51);
162 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 34);
163 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 38);
164 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 39);
165 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 40);
166 168 : compiler::TNode<Smi> tmp52;
167 168 : USE(tmp52);
168 168 : tmp52 = ca_.UncheckedCast<Smi>(BaseBuiltinsFromDSLAssembler(state_).LoadLengthFromAdapterFrame(compiler::TNode<Context>{tmp45}, compiler::TNode<RawPtrT>{tmp51}));
169 168 : compiler::TNode<BInt> tmp53;
170 168 : USE(tmp53);
171 168 : tmp53 = ca_.UncheckedCast<BInt>(BaseBuiltinsFromDSLAssembler(state_).Convert6ATbint5ATSmi(compiler::TNode<Smi>{tmp52}));
172 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 41);
173 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 38);
174 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 7);
175 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 38);
176 168 : ca_.Goto(&block7, tmp45, tmp46, tmp47, tmp48, tmp49, tmp50, tmp51, tmp51, tmp53, tmp49, tmp51, tmp53, tmp49, tmp51, tmp53, tmp49);
177 : }
178 :
179 168 : if (block7.is_used()) {
180 168 : compiler::TNode<Context> tmp54;
181 168 : compiler::TNode<JSFunction> tmp55;
182 168 : compiler::TNode<RawPtrT> tmp56;
183 168 : compiler::TNode<SharedFunctionInfo> tmp57;
184 168 : compiler::TNode<BInt> tmp58;
185 168 : compiler::TNode<BInt> tmp59;
186 168 : compiler::TNode<RawPtrT> tmp60;
187 168 : compiler::TNode<RawPtrT> tmp61;
188 168 : compiler::TNode<BInt> tmp62;
189 168 : compiler::TNode<BInt> tmp63;
190 168 : compiler::TNode<RawPtrT> tmp64;
191 168 : compiler::TNode<BInt> tmp65;
192 168 : compiler::TNode<BInt> tmp66;
193 168 : compiler::TNode<RawPtrT> tmp67;
194 168 : compiler::TNode<BInt> tmp68;
195 168 : compiler::TNode<BInt> tmp69;
196 168 : ca_.Bind(&block7, &tmp54, &tmp55, &tmp56, &tmp57, &tmp58, &tmp59, &tmp60, &tmp61, &tmp62, &tmp63, &tmp64, &tmp65, &tmp66, &tmp67, &tmp68, &tmp69);
197 168 : ca_.Goto(&block1, tmp54, tmp55, tmp61, tmp62, tmp63);
198 : }
199 :
200 168 : if (block1.is_used()) {
201 168 : compiler::TNode<Context> tmp70;
202 168 : compiler::TNode<JSFunction> tmp71;
203 168 : compiler::TNode<RawPtrT> tmp72;
204 168 : compiler::TNode<BInt> tmp73;
205 168 : compiler::TNode<BInt> tmp74;
206 168 : ca_.Bind(&block1, &tmp70, &tmp71, &tmp72, &tmp73, &tmp74);
207 168 : ca_.SetSourcePosition("../../src/builtins/arguments.tq", 24);
208 168 : ca_.Goto(&block8, tmp70, tmp71, tmp72, tmp73, tmp74);
209 : }
210 :
211 168 : compiler::TNode<Context> tmp75;
212 168 : compiler::TNode<JSFunction> tmp76;
213 168 : compiler::TNode<RawPtrT> tmp77;
214 168 : compiler::TNode<BInt> tmp78;
215 168 : compiler::TNode<BInt> tmp79;
216 168 : ca_.Bind(&block8, &tmp75, &tmp76, &tmp77, &tmp78, &tmp79);
217 336 : return ArgumentsBuiltinsFromDSLAssembler::ArgumentsInfo{compiler::TNode<RawPtrT>{tmp77}, compiler::TNode<BInt>{tmp78}, compiler::TNode<BInt>{tmp79}};
218 : }
219 :
220 : } // namespace internal
221 86739 : } // namespace v8
222 :
|