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-string-gen.h" | 5 #include "src/builtins/builtins-string-gen.h" |
6 #include "src/builtins/builtins-utils-gen.h" | 6 #include "src/builtins/builtins-utils-gen.h" |
7 #include "src/builtins/builtins.h" | 7 #include "src/builtins/builtins.h" |
8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 InitIteratingArrayBuiltinLoopContinuation(context, receiver, callbackfn, | 1197 InitIteratingArrayBuiltinLoopContinuation(context, receiver, callbackfn, |
1198 this_arg, array, object, initial_k, | 1198 this_arg, array, object, initial_k, |
1199 len, to); | 1199 len, to); |
1200 | 1200 |
1201 GenerateIteratingArrayBuiltinLoopContinuation( | 1201 GenerateIteratingArrayBuiltinLoopContinuation( |
1202 &ArrayBuiltinCodeStubAssembler::ForEachProcessor, | 1202 &ArrayBuiltinCodeStubAssembler::ForEachProcessor, |
1203 &ArrayBuiltinCodeStubAssembler::NullPostLoopAction); | 1203 &ArrayBuiltinCodeStubAssembler::NullPostLoopAction); |
1204 } | 1204 } |
1205 | 1205 |
| 1206 TF_BUILTIN(ArrayForEachLoopEagerDeoptContinuation, |
| 1207 ArrayBuiltinCodeStubAssembler) { |
| 1208 Node* context = Parameter(Descriptor::kContext); |
| 1209 Node* receiver = Parameter(Descriptor::kReceiver); |
| 1210 Node* callbackfn = Parameter(Descriptor::kCallbackFn); |
| 1211 Node* this_arg = Parameter(Descriptor::kThisArg); |
| 1212 Node* initial_k = Parameter(Descriptor::kInitialK); |
| 1213 Node* len = Parameter(Descriptor::kLength); |
| 1214 |
| 1215 Callable stub(Builtins::CallableFor(isolate(), |
| 1216 Builtins::kArrayForEachLoopContinuation)); |
| 1217 Return(CallStub(stub, context, receiver, callbackfn, this_arg, |
| 1218 UndefinedConstant(), receiver, initial_k, len, |
| 1219 UndefinedConstant())); |
| 1220 } |
| 1221 |
| 1222 TF_BUILTIN(ArrayForEachLoopLazyDeoptContinuation, |
| 1223 ArrayBuiltinCodeStubAssembler) { |
| 1224 Node* context = Parameter(Descriptor::kContext); |
| 1225 Node* receiver = Parameter(Descriptor::kReceiver); |
| 1226 Node* callbackfn = Parameter(Descriptor::kCallbackFn); |
| 1227 Node* this_arg = Parameter(Descriptor::kThisArg); |
| 1228 Node* initial_k = Parameter(Descriptor::kInitialK); |
| 1229 Node* len = Parameter(Descriptor::kLength); |
| 1230 |
| 1231 Callable stub(Builtins::CallableFor(isolate(), |
| 1232 Builtins::kArrayForEachLoopContinuation)); |
| 1233 Return(CallStub(stub, context, receiver, callbackfn, this_arg, |
| 1234 UndefinedConstant(), receiver, initial_k, len, |
| 1235 UndefinedConstant())); |
| 1236 } |
| 1237 |
1206 TF_BUILTIN(ArrayForEach, ArrayBuiltinCodeStubAssembler) { | 1238 TF_BUILTIN(ArrayForEach, ArrayBuiltinCodeStubAssembler) { |
1207 Node* argc = | 1239 Node* argc = |
1208 ChangeInt32ToIntPtr(Parameter(BuiltinDescriptor::kArgumentsCount)); | 1240 ChangeInt32ToIntPtr(Parameter(BuiltinDescriptor::kArgumentsCount)); |
1209 CodeStubArguments args(this, argc); | 1241 CodeStubArguments args(this, argc); |
1210 Node* context = Parameter(BuiltinDescriptor::kContext); | 1242 Node* context = Parameter(BuiltinDescriptor::kContext); |
1211 Node* new_target = Parameter(BuiltinDescriptor::kNewTarget); | 1243 Node* new_target = Parameter(BuiltinDescriptor::kNewTarget); |
1212 Node* receiver = args.GetReceiver(); | 1244 Node* receiver = args.GetReceiver(); |
1213 Node* callbackfn = args.GetOptionalArgumentValue(0, UndefinedConstant()); | 1245 Node* callbackfn = args.GetOptionalArgumentValue(0, UndefinedConstant()); |
1214 Node* this_arg = args.GetOptionalArgumentValue(1, UndefinedConstant()); | 1246 Node* this_arg = args.GetOptionalArgumentValue(1, UndefinedConstant()); |
1215 | 1247 |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2464 { | 2496 { |
2465 Node* message = SmiConstant(MessageTemplate::kDetachedOperation); | 2497 Node* message = SmiConstant(MessageTemplate::kDetachedOperation); |
2466 CallRuntime(Runtime::kThrowTypeError, context, message, | 2498 CallRuntime(Runtime::kThrowTypeError, context, message, |
2467 HeapConstant(operation)); | 2499 HeapConstant(operation)); |
2468 Unreachable(); | 2500 Unreachable(); |
2469 } | 2501 } |
2470 } | 2502 } |
2471 | 2503 |
2472 } // namespace internal | 2504 } // namespace internal |
2473 } // namespace v8 | 2505 } // namespace v8 |
OLD | NEW |