| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 | 1267 |
| 1268 void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) { | 1268 void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) { |
| 1269 Comment cmnt(masm_, "[ ForOfStatement"); | 1269 Comment cmnt(masm_, "[ ForOfStatement"); |
| 1270 SetStatementPosition(stmt); | 1270 SetStatementPosition(stmt); |
| 1271 | 1271 |
| 1272 Iteration loop_statement(this, stmt); | 1272 Iteration loop_statement(this, stmt); |
| 1273 increment_loop_depth(); | 1273 increment_loop_depth(); |
| 1274 | 1274 |
| 1275 // var iterable = subject | |
| 1276 VisitForAccumulatorValue(stmt->assign_iterable()); | |
| 1277 __ mov(a0, v0); | |
| 1278 | |
| 1279 // As with for-in, skip the loop if the iterator is null or undefined. | |
| 1280 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | |
| 1281 __ Branch(loop_statement.break_label(), eq, a0, Operand(at)); | |
| 1282 __ LoadRoot(at, Heap::kNullValueRootIndex); | |
| 1283 __ Branch(loop_statement.break_label(), eq, a0, Operand(at)); | |
| 1284 | |
| 1285 // var iterator = iterable[Symbol.iterator](); | 1275 // var iterator = iterable[Symbol.iterator](); |
| 1286 VisitForEffect(stmt->assign_iterator()); | 1276 VisitForEffect(stmt->assign_iterator()); |
| 1287 | 1277 |
| 1288 // Loop entry. | 1278 // Loop entry. |
| 1289 __ bind(loop_statement.continue_label()); | 1279 __ bind(loop_statement.continue_label()); |
| 1290 | 1280 |
| 1291 // result = iterator.next() | 1281 // result = iterator.next() |
| 1292 VisitForEffect(stmt->next_result()); | 1282 VisitForEffect(stmt->next_result()); |
| 1293 | 1283 |
| 1294 // if (result.done) break; | 1284 // if (result.done) break; |
| (...skipping 3595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4890 Assembler::target_address_at(pc_immediate_load_address)) == | 4880 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4891 reinterpret_cast<uint32_t>( | 4881 reinterpret_cast<uint32_t>( |
| 4892 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4882 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4893 return OSR_AFTER_STACK_CHECK; | 4883 return OSR_AFTER_STACK_CHECK; |
| 4894 } | 4884 } |
| 4895 | 4885 |
| 4896 | 4886 |
| 4897 } } // namespace v8::internal | 4887 } } // namespace v8::internal |
| 4898 | 4888 |
| 4899 #endif // V8_TARGET_ARCH_MIPS | 4889 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |