OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 | 7 |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stub-assembler.h" | 9 #include "src/code-stub-assembler.h" |
10 #include "src/contexts.h" | 10 #include "src/contexts.h" |
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2274 typedef compiler::Node Node; | 2274 typedef compiler::Node Node; |
2275 typedef CodeStubAssembler::Label Label; | 2275 typedef CodeStubAssembler::Label Label; |
2276 typedef CodeStubAssembler::Variable Variable; | 2276 typedef CodeStubAssembler::Variable Variable; |
2277 CodeStubAssembler assembler(state); | 2277 CodeStubAssembler assembler(state); |
2278 | 2278 |
2279 Handle<String> operation = assembler.factory()->NewStringFromAsciiChecked( | 2279 Handle<String> operation = assembler.factory()->NewStringFromAsciiChecked( |
2280 "Array Iterator.prototype.next", TENURED); | 2280 "Array Iterator.prototype.next", TENURED); |
2281 | 2281 |
2282 Node* iterator = assembler.Parameter(0); | 2282 Node* iterator = assembler.Parameter(0); |
2283 Node* context = assembler.Parameter(3); | 2283 Node* context = assembler.Parameter(3); |
2284 | |
Dan Ehrenberg
2017/01/13 19:41:08
Nit: Revert whitespace change
| |
2285 Variable var_value(&assembler, MachineRepresentation::kTagged); | 2284 Variable var_value(&assembler, MachineRepresentation::kTagged); |
2286 Variable var_done(&assembler, MachineRepresentation::kTagged); | 2285 Variable var_done(&assembler, MachineRepresentation::kTagged); |
2287 | 2286 |
2288 // Required, or else `throw_bad_receiver` fails a DCHECK due to these | 2287 // Required, or else `throw_bad_receiver` fails a DCHECK due to these |
2289 // variables not being bound along all paths, despite not being used. | 2288 // variables not being bound along all paths, despite not being used. |
2290 var_done.Bind(assembler.TrueConstant()); | 2289 var_done.Bind(assembler.TrueConstant()); |
2291 var_value.Bind(assembler.UndefinedConstant()); | 2290 var_value.Bind(assembler.UndefinedConstant()); |
2292 | 2291 |
2293 Label throw_bad_receiver(&assembler, Label::kDeferred); | 2292 Label throw_bad_receiver(&assembler, Label::kDeferred); |
2294 Label set_done(&assembler); | 2293 Label set_done(&assembler); |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2745 Node* message = assembler.SmiConstant(MessageTemplate::kDetachedOperation); | 2744 Node* message = assembler.SmiConstant(MessageTemplate::kDetachedOperation); |
2746 Node* result = | 2745 Node* result = |
2747 assembler.CallRuntime(Runtime::kThrowTypeError, context, message, | 2746 assembler.CallRuntime(Runtime::kThrowTypeError, context, message, |
2748 assembler.HeapConstant(operation)); | 2747 assembler.HeapConstant(operation)); |
2749 assembler.Return(result); | 2748 assembler.Return(result); |
2750 } | 2749 } |
2751 } | 2750 } |
2752 | 2751 |
2753 } // namespace internal | 2752 } // namespace internal |
2754 } // namespace v8 | 2753 } // namespace v8 |
OLD | NEW |