| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 Label ok; | 284 Label ok; |
| 285 ExternalReference stack_limit = | 285 ExternalReference stack_limit = |
| 286 ExternalReference::address_of_stack_limit(isolate()); | 286 ExternalReference::address_of_stack_limit(isolate()); |
| 287 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 287 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
| 288 __ j(above_equal, &ok, Label::kNear); | 288 __ j(above_equal, &ok, Label::kNear); |
| 289 StackCheckStub stub; | 289 StackCheckStub stub; |
| 290 __ CallStub(&stub); | 290 __ CallStub(&stub); |
| 291 __ bind(&ok); | 291 __ bind(&ok); |
| 292 } | 292 } |
| 293 | 293 |
| 294 if (function()->is_generator()) { |
| 295 Comment cmnt(masm_, "[ Generator Iterator"); |
| 296 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 297 __ CallRuntime(Runtime::kCreateJSGeneratorIterator, 1); |
| 298 // TODO(wingo): Suspend the generator. |
| 299 EmitReturnSequence(); |
| 300 } |
| 301 |
| 294 { Comment cmnt(masm_, "[ Body"); | 302 { Comment cmnt(masm_, "[ Body"); |
| 295 ASSERT(loop_depth() == 0); | 303 ASSERT(loop_depth() == 0); |
| 296 VisitStatements(function()->body()); | 304 VisitStatements(function()->body()); |
| 297 ASSERT(loop_depth() == 0); | 305 ASSERT(loop_depth() == 0); |
| 298 } | 306 } |
| 299 } | 307 } |
| 300 | 308 |
| 301 // Always emit a 'return undefined' in case control fell off the end of | 309 // Always emit a 'return undefined' in case control fell off the end of |
| 302 // the body. | 310 // the body. |
| 303 { Comment cmnt(masm_, "[ return <undefined>;"); | 311 { Comment cmnt(masm_, "[ return <undefined>;"); |
| (...skipping 4249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4553 *stack_depth = 0; | 4561 *stack_depth = 0; |
| 4554 *context_length = 0; | 4562 *context_length = 0; |
| 4555 return previous_; | 4563 return previous_; |
| 4556 } | 4564 } |
| 4557 | 4565 |
| 4558 #undef __ | 4566 #undef __ |
| 4559 | 4567 |
| 4560 } } // namespace v8::internal | 4568 } } // namespace v8::internal |
| 4561 | 4569 |
| 4562 #endif // V8_TARGET_ARCH_IA32 | 4570 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |