OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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 #include "src/builtins/builtins-utils-gen.h" | 5 #include "src/builtins/builtins-utils-gen.h" |
6 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
7 #include "src/code-stub-assembler.h" | 7 #include "src/code-stub-assembler.h" |
8 #include "src/ic/binary-op-assembler.h" | 8 #include "src/ic/binary-op-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 Return(SmiConstant(0)); | 245 Return(SmiConstant(0)); |
246 | 246 |
247 BIND(&if_inputisnotzero); | 247 BIND(&if_inputisnotzero); |
248 Return(input); | 248 Return(input); |
249 } | 249 } |
250 | 250 |
251 BIND(&if_inputisnotnumber); | 251 BIND(&if_inputisnotnumber); |
252 { | 252 { |
253 // Need to convert the {input} to String first. | 253 // Need to convert the {input} to String first. |
254 // TODO(bmeurer): This could be more efficient if necessary. | 254 // TODO(bmeurer): This could be more efficient if necessary. |
255 Callable callable = CodeFactory::ToString(isolate()); | 255 var_input.Bind(CallBuiltin(Builtins::kToString, context, input)); |
256 var_input.Bind(CallStub(callable, context, input)); | |
257 Goto(&loop); | 256 Goto(&loop); |
258 } | 257 } |
259 } | 258 } |
260 } | 259 } |
261 } | 260 } |
262 } | 261 } |
263 | 262 |
264 // ES6 #sec-number.parseint | 263 // ES6 #sec-number.parseint |
265 TF_BUILTIN(NumberParseInt, CodeStubAssembler) { | 264 TF_BUILTIN(NumberParseInt, CodeStubAssembler) { |
266 Node* context = Parameter(Descriptor::kContext); | 265 Node* context = Parameter(Descriptor::kContext); |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 Node* right = Parameter(Descriptor::kRight); | 1442 Node* right = Parameter(Descriptor::kRight); |
1444 Node* slot = Parameter(Descriptor::kSlot); | 1443 Node* slot = Parameter(Descriptor::kSlot); |
1445 Node* vector = Parameter(Descriptor::kVector); | 1444 Node* vector = Parameter(Descriptor::kVector); |
1446 | 1445 |
1447 Return(Generate_ModulusWithFeedback(context, left, right, | 1446 Return(Generate_ModulusWithFeedback(context, left, right, |
1448 ChangeUint32ToWord(slot), vector)); | 1447 ChangeUint32ToWord(slot), vector)); |
1449 } | 1448 } |
1450 | 1449 |
1451 } // namespace internal | 1450 } // namespace internal |
1452 } // namespace v8 | 1451 } // namespace v8 |
OLD | NEW |