Yukihiro "Matz" Matsumoto
3e00684faa
resolve conflict
2014-04-16 15:18:52 +09:00
Takeshi Watanabe
824d3450c5
Qualify argv argument of API const.
2014-04-11 20:38:23 +09:00
take_cheeze
9f24cd6d79
Qualify mrb_yield_*'s argv const.
2014-04-10 17:34:38 +09:00
take_cheeze
90d74b99ff
Add MRB_TT_HAS_BASIC_P macro to check whether a typetag has MRB_OBJECT_HEADER.
2014-04-09 14:26:26 +09:00
Yukihiro "Matz" Matsumoto
bfd2a539ed
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
2014-03-26 01:09:09 +09:00
cubicdaiya
8f8c174fc2
Use MRB_ARGS_REST() instead of ARGS_REST()
...
According to include/mruby.h,
/* compatibility macros; will be removed */
#define ARGS_REST() MRB_ARGS_REST()
2014-03-23 12:48:34 +09:00
take_cheeze
e854a0e850
make Fiber#transfer compatible with CRuby
2014-03-21 22:10:47 +09:00
take_cheeze
272fe3d864
use FiberError in fiber exception raise
2014-03-20 04:38:34 +09:00
Yukihiro "Matz" Matsumoto
d9107fd157
Merge pull request #1890 from take-cheeze/fiber_resuming
...
Revert MRB_FIBER_RESUMED as MRB_FIBER_RESUMING.
2014-03-19 08:59:45 +09:00
Yukihiro "Matz" Matsumoto
9084e03556
rename mrb_yield_internal to mrb_yield_with_class since it's no longer internal
2014-03-19 08:57:54 +09:00
Tomoyuki Sahara
93694fe521
export mrb_yield_internal.
2014-03-19 01:08:01 +09:00
take_cheeze
19c4bf6fcb
revert MRB_FIBER_RESUMED as MRB_FIBER_RESUMING to fix recurive resume
2014-03-19 01:05:21 +09:00
Yukihiro "Matz" Matsumoto
792c1add0c
string functions arguments changed from mrb_int to size_t that would take strlen()
2014-03-19 00:46:27 +09:00
Yukihiro "Matz" Matsumoto
180b3d5678
change mrb_int to size_t that would take strlen()
2014-03-19 00:17:03 +09:00
cubicdaiya
cee152670a
unify indent style
2014-03-16 07:44:44 +09:00
Yukihiro "Matz" Matsumoto
ef884caca5
Merge branch 'master' of github.com:mruby/mruby
2014-03-15 16:03:21 +09:00
Yukihiro "Matz" Matsumoto
048bca43c9
string length type to be mrb_int
2014-03-15 15:47:21 +09:00
Yukihiro "Matz" Matsumoto
c476c1b528
symbol length type to be mrb_int
2014-03-15 15:43:40 +09:00
take_cheeze
62f05614ee
Add Fiber's double resume test and fix it.
2014-03-15 15:18:06 +09:00
Yukihiro "Matz" Matsumoto
ad04b45e5b
Merge pull request #1851 from tmash06/add_include_limit_h
...
add including limits.h.
2014-03-13 03:09:03 +09:00
tmash06
cfcd2e2dc9
add including limits.h.
...
Because Android's libc(bionic) defines SIZE_MAX at limits.h.
2014-03-13 02:37:09 +09:00
cremno
e4afd5374f
add mrb_strlen_lit which makes _lit macros safer
...
strlen(3) + string literal is usually optimized but strlen(3) doesn't
check if its argument is really a string literal. This is important for
mruby's _static functions to which some _lit macros are expanded (string
literals have static storage). See comment for some additional info.
remove unnecessary parentheses
2014-03-12 17:56:08 +01:00
take_cheeze
78915f9601
support c++ exception
2014-03-01 20:05:29 +09:00
cubicdaiya
67de10bfcb
use C style comments instead of C++ style comments
...
According to CONTRIBUTING.md,
Don't use C++ style comments
/* This is the prefered comment style */
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
Yukihiro "Matz" Matsumoto
2c7204fc93
mrb_fiber_yield() is available now; you have to link mruby-fiber mrbgem to use the function; there's no function available to create new fiber from C (countapart of Lua's lua_newthread), but that's because you cannot create a new fiber from C due to mruby C API design limitation. define your method to create fibers in Ruby; close #1269
2014-03-01 00:48:08 +09:00
Tomoyuki Sahara
50ef284015
include mruby/version.h in mruby.h
2014-02-12 10:26:19 +09:00
Miura Hideki
5df82e357c
Store raw stack address in callinfo instead of offset from stbas
2014-02-09 16:42:25 +09:00
Yukihiro "Matz" Matsumoto
d8a5f12053
forget to add function prototypes
2014-02-08 13:56:15 +09:00
Yukihiro "Matz" Matsumoto
ed1bf9aa80
introduce mrb_str_new_lit() to create strings from C string litrals
2014-02-06 07:50:34 +09:00
Yukihiro "Matz" Matsumoto
4e2a9509dc
Merge pull request #1669 from cremno/copyright-2014
...
update copyright year
2014-01-31 00:01:09 -08:00
Yukihiro "Matz" Matsumoto
210e7b668e
Merge pull request #1668 from cremno/etc-c-cleanup
...
etc.c: small cleanup
2014-01-31 00:00:41 -08:00
cremno
eaf445ea5c
mruby.h: remove mrb_str_format declaration
...
The function mrb_str_format is only defined when the mrbgem mruby-sprintf was
activated. That might not always be the case (by default it currently is).
mrb_str_format still has external linkage, so from now on mrbgem authors
have to declare it in their source code if they want or need to call it.
2014-01-30 23:50:18 +01:00
cremno
3ee946dab4
Happy new year! (update copyright year)
...
Let's not wait until May this time
(f0a9b95af3 )!
2014-01-30 23:17:24 +01:00
cremno
d90f52f552
etc.c: small cleanup (delete unused functions)
...
mrb_data_object_alloc: unnecessary cast
mrb_lastline_get: mruby doesn't support $_, weird and unused code
mrb_exec_recursive: see 4e46abb869
mrb_block_proc: unused, doesn't really do anything (or needs to be
rewritten)
mrb_obj_to_sym: actually use id (and MSVC detected unreachable code)
2014-01-30 23:16:46 +01:00
Yukihiro "Matz" Matsumoto
e0e5aebc66
add callback invocation from OP_DEBUG
2014-01-23 15:08:38 +09:00
Yukihiro "Matz" Matsumoto
c6ceed22d9
rename mrb_intern_litral -> mrb_intern_static
2013-12-25 08:40:26 +09:00
Yukihiro "Matz" Matsumoto
bc7a6e88a1
zero copy C literal strings in symbol table
2013-12-24 08:27:42 +09:00
crimsonwoods
370ad6fade
Remove 'mrb_state' field from 'kh_xxx_t' structure.
...
'kh_xxx_t' requires 'mrb_state' to allocate, free, and compute hash value.
But 'mrb_state' should not be held by 'kh_xxx_t' and 'mrb_state' should be
supplied from outside.
2013-12-23 00:33:07 -08:00
take_cheeze
df780ae5e9
add mrb_intern_lit for creating symbol from string literal
2013-12-01 10:38:59 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
07b8a5b042
Make mrb->arena variable sized. Use MRB_GC_FIXED_ARENA for old behavior.
...
You will not see "arena overflow" error anymore, but I encourage gem authors
to check your gems with MRB_GC_FIXED_ARENA to avoid memory broat.
2013-11-22 09:20:06 +09:00
Tomoyuki Sahara
1e89fc8240
declare struct mrb_irep.
2013-11-21 13:35:46 +09:00
Yukihiro "Matz" Matsumoto
c8936754e8
wrong return value from read_lineno_record()
2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto
e92d4e2680
modified to use irep->reps to reference child ireps. preparation for
...
removing irep array from mrb_state. note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
fleuria
a511957ec8
refactor mrb_context_run()
2013-11-03 12:05:25 +08:00
fleuria
d75a907edf
introduce mrb_context_run()
...
currently there are two scnenario to call mrb_run(), the first is
calling a proc, in this case mrb should create a new environment,
discarding all the variables except args, reciever and block.
the second is calling the newly generated irep, like in mirb.
in this case, the variables should be kept after mrb_run().
so we introduce mrb_context_run() to handle this seperately.
2013-11-03 11:32:59 +08:00
Yukihiro "Matz" Matsumoto
a7c9a71684
better error position display
2013-10-15 12:49:41 +09:00
Dusan D. Majkic
1228415c97
Remove function delaration not implemented in code
2013-09-28 22:10:44 +02:00
Yukihiro "Matz" Matsumoto
9194047791
change type of mrb->c->status from uint8_t to enum mrb_fiber_state; #1511
2013-09-25 02:39:59 +09:00
take_cheeze
d12b6ab218
add verbose_backtrace
2013-09-02 00:48:06 +09:00