bennyxqg / lua-alchemy

Automatically exported from code.google.com/p/lua-alchemy
0 stars 0 forks source link

Patch to add support for yielding from metamethods/pcalls/iterators/callbacks #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patch is LuaCoco 1.1.5 with support added for Alchemy.  This
will allow coroutine yields across C
calls(metamethods/pcalls/iterators/callbacks).

Original LuaCoco patch:
http://luajit.org/coco.html

To add support for Alchemy I inlined ActionScript code using __asm__() just
like how real x86 assembly is inlined.  Most of the ActionScript code for
the coco_switch function is taken from the _setjmp/_longjmp implementations
provided by Alchemy (pulled from a generated *.achacks.as temp file)

Robert G. Jakabosky

diffstats:
 Makefile           |    2 
 lua/src/Makefile   |   76 +++---
 lua/src/lapi.c     |   15 -
 lua/src/lbaselib.c |   28 ++
 lua/src/lcoco.c    |  653
+++++++++++++++++++++++++++++++++++++++++++++++++++++
 lua/src/lcoco.h    |   72 +++++
 lua/src/ldo.c      |   14 -
 lua/src/lstate.c   |    4 
 lua/src/lstate.h   |    4 
 9 files changed, 815 insertions(+), 53 deletions(-)

Original issue reported on code.google.com by rjakabo...@gmail.com on 26 Dec 2008 at 5:28

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 27 Dec 2008 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 5 Jan 2009 at 11:20

GoogleCodeExporter commented 9 years ago

Original comment by aglad...@gmail.com on 5 Jan 2009 at 11:20