| 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-iterator-gen.h" | 5 #include "src/builtins/builtins-iterator-gen.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 | 9 |
| 10 using compiler::Node; | 10 using compiler::Node; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // IteratorComplete | 70 // IteratorComplete |
| 71 // 2. Return ToBoolean(? Get(iterResult, "done")). | 71 // 2. Return ToBoolean(? Get(iterResult, "done")). |
| 72 Node* done = GetProperty(context, result, factory()->done_string()); | 72 Node* done = GetProperty(context, result, factory()->done_string()); |
| 73 var_done.Bind(done); | 73 var_done.Bind(done); |
| 74 | 74 |
| 75 Label to_boolean(this, Label::kDeferred); | 75 Label to_boolean(this, Label::kDeferred); |
| 76 GotoIf(TaggedIsSmi(done), &to_boolean); | 76 GotoIf(TaggedIsSmi(done), &to_boolean); |
| 77 Branch(IsBoolean(done), &return_result, &to_boolean); | 77 Branch(IsBoolean(done), &return_result, &to_boolean); |
| 78 | 78 |
| 79 BIND(&to_boolean); | 79 BIND(&to_boolean); |
| 80 var_done.Bind(CallStub(CodeFactory::ToBoolean(isolate()), context, done)); | 80 var_done.Bind(CallBuiltin(Builtins::kToBoolean, context, done)); |
| 81 Goto(&return_result); | 81 Goto(&return_result); |
| 82 } | 82 } |
| 83 | 83 |
| 84 BIND(&if_notobject); | 84 BIND(&if_notobject); |
| 85 { | 85 { |
| 86 CallRuntime(Runtime::kThrowIteratorResultNotAnObject, context, result); | 86 CallRuntime(Runtime::kThrowIteratorResultNotAnObject, context, result); |
| 87 Goto(if_done); | 87 Goto(if_done); |
| 88 } | 88 } |
| 89 | 89 |
| 90 BIND(&return_result); | 90 BIND(&return_result); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 BIND(&rethrow_exception); | 156 BIND(&rethrow_exception); |
| 157 { | 157 { |
| 158 CallRuntime(Runtime::kReThrow, context, exception); | 158 CallRuntime(Runtime::kReThrow, context, exception); |
| 159 Unreachable(); | 159 Unreachable(); |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace internal | 163 } // namespace internal |
| 164 } // namespace v8 | 164 } // namespace v8 |
| OLD | NEW |