Ticket #83 (new defect)

Opened 2 years ago

Last modified 5 months ago

Implement Generators

Reported by: robertwb Owned by: somebody
Priority: major Milestone: 1.0
Component: Code Generation Keywords:
Cc:

Description


Change History

Changed 18 months ago by scoder

  • milestone changed from wishlist to 1.0

Changed 18 months ago by dagss

Assuming one selects a "switch-statement-to-resume-function"-strategy:

I just read about something called "threaded dispatch" which could be used to speed up this over a standard switch statement; basically GCC allowes one to take addresses of labels and dispatch to them later.

One should be able to make conditional macros for this so that it falls backs to a switch dispatch.

Changed 17 months ago by scoder

That's basically how I always thought about this anyway: When yielding a value, keep a pointer to the continuation point and store the local function state away, then return. When continuing, check if the continuation pointer is NULL (in which case we are just starting), otherwise, restore the local function state and jump to the label the pointer points to.

Changed 10 months ago by scoder

  • owner changed from somebody to scoder

Changed 9 months ago by scoder

Changed 5 months ago by scoder

  • owner changed from scoder to somebody
Note: See TracTickets for help on using tickets.