Bug 150290

Summary: [ES6] Implement Generators
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adam, ashvayka, fealebenpae, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, saam, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 151547, 150769, 150792, 151545, 151546, 151552    
Bug Blocks:    

Yusuke Suzuki
Reported 2015-10-17 16:08:13 PDT
Implement ES6 generators. Consider the following case, let generator = gen(); // first example. for (let value of generator) { ... } function* gen() { // (1). ... // (2). yield; } in for-of, we call generator.next(). In the first case, it starts from (1). And the second call starts from (2). So I think generating the following code for ES6 generator is the easiest way to handle it in DFG / FTL. How about this? // Entry point is only one. Every time we call generator.next(), the function will start from here. resume_to_yield (generator_object) // This resumes frame and jump. label_1: // (1). special_return; label_2: // (2). special_return;
Attachments
Yusuke Suzuki
Comment 1 2015-10-31 10:34:10 PDT
Working on syntax part at first...
Note You need to log in before you can comment on or make changes to this bug.