OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 Label ok; | 293 Label ok; |
294 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 294 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
295 __ cmp(sp, Operand(ip)); | 295 __ cmp(sp, Operand(ip)); |
296 __ b(hs, &ok); | 296 __ b(hs, &ok); |
297 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); | 297 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); |
298 StackCheckStub stub; | 298 StackCheckStub stub; |
299 __ CallStub(&stub); | 299 __ CallStub(&stub); |
300 __ bind(&ok); | 300 __ bind(&ok); |
301 } | 301 } |
302 | 302 |
| 303 if (function()->is_generator()) { |
| 304 Comment cmnt(masm_, "[ Generator Iterator"); |
| 305 __ ldr(r2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 306 __ push(r2); |
| 307 __ CallRuntime(Runtime::kCreateJSGeneratorIterator, 1); |
| 308 // TODO(wingo): Suspend the generator. |
| 309 EmitReturnSequence(); |
| 310 } |
| 311 |
303 { Comment cmnt(masm_, "[ Body"); | 312 { Comment cmnt(masm_, "[ Body"); |
304 ASSERT(loop_depth() == 0); | 313 ASSERT(loop_depth() == 0); |
305 VisitStatements(function()->body()); | 314 VisitStatements(function()->body()); |
306 ASSERT(loop_depth() == 0); | 315 ASSERT(loop_depth() == 0); |
307 } | 316 } |
308 } | 317 } |
309 | 318 |
310 // Always emit a 'return undefined' in case control fell off the end of | 319 // Always emit a 'return undefined' in case control fell off the end of |
311 // the body. | 320 // the body. |
312 { Comment cmnt(masm_, "[ return <undefined>;"); | 321 { Comment cmnt(masm_, "[ return <undefined>;"); |
(...skipping 4270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4583 *context_length = 0; | 4592 *context_length = 0; |
4584 return previous_; | 4593 return previous_; |
4585 } | 4594 } |
4586 | 4595 |
4587 | 4596 |
4588 #undef __ | 4597 #undef __ |
4589 | 4598 |
4590 } } // namespace v8::internal | 4599 } } // namespace v8::internal |
4591 | 4600 |
4592 #endif // V8_TARGET_ARCH_ARM | 4601 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |