cremno
a2cfc9a9af
rework mruby-objectspace and gc.[ch]
...
- functions should have C linkage (for C++ code)
- add prefix to each_object_callback
- use more appropriate variable types / initialization
- ObjectSpace::count_objects has 1 opt. arg.
- prefer mrb_intern_lit to mrb_intern_cstr for str. lit.
- mruby/value.h is included by mruby.h
- adjust coding style
2014-01-31 17:42:05 +01: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
a68a517028
refactor parser lineno adjustment; ref #1667
2014-01-31 00:49:46 +09:00
h2so5
36e0925053
more accurate backtrace lineno
2014-01-30 10:08:04 +09:00
Yukihiro "Matz" Matsumoto
e0e5aebc66
add callback invocation from OP_DEBUG
2014-01-23 15:08:38 +09:00
Yukihiro "Matz" Matsumoto
dc27c2be46
Merge pull request #1634 from cremno/use-mrb_fixnum_p
...
tiny word boxing optimization
2014-01-02 15:46:00 -08:00
cremno
09bb30870b
tiny word boxing optimization
2014-01-02 06:36:29 +01:00
cremno
16c5cf92b0
NaN boxing: use uintptr_t for bit manipulations
2014-01-02 06:19:20 +01:00
Yukihiro "Matz" Matsumoto
673d9183cf
avoid copying when the original string comes with MRB_STR_NOFREE
2013-12-25 10:30:48 +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
Yukihiro "Matz" Matsumoto
9fab01caee
remove MRB_IREP_ARRAY_INIT_SIZE which is no longer used
2013-12-24 07:26:35 +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
9ac386923d
float objects in pool are objects when MRB_WORD_BOXING is set
2013-11-27 17:29:28 +09:00
kyab
1a6244d99d
Fix build error for MRB_WORD_BOXING
2013-11-26 20:28:24 +09:00
Yukihiro "Matz" Matsumoto
ed0d9f0066
remove MRB_PARSER_BUF_SIZE configuration; close #1596
2013-11-25 09:48:31 +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
fb386011df
rename API mrb_str_dup_static() -> mrb_str_pool()
2013-11-20 08:37:16 +09:00
Miura Hideki
54c5b12fb7
irep->pool struct pool -> mrb_value
2013-11-19 20:38:02 +09:00
Yukihiro "Matz" Matsumoto
04a2c58e94
add new function mrb_load_irep_file_cxt() and simplifies mruby.c
2013-11-15 10:49:40 +09:00
Yukihiro "Matz" Matsumoto
71354b91cb
enum mrb_vtype varies on compile time configuration, namely MRB_NAN_BOXING
2013-11-15 02:45:52 +09:00
Yukihiro "Matz" Matsumoto
3bbf66f9f3
cancel #1565 since it breaks mirb; instead add special treatment to heredocs
2013-11-10 04:32:57 +09:00
Yukihiro "Matz" Matsumoto
29792d1725
Merge branch 'master' of github.com:mruby/mruby
2013-11-09 23:29:50 +09:00
Yukihiro "Matz" Matsumoto
ec0a94dae6
Merge pull request #1565 from Fleurer/fix1564
...
nextc(): always return an '\n' at end of input
2013-11-08 17:22:59 -08:00
Yukihiro "Matz" Matsumoto
de790bdc27
allow irep to be GCed
2013-11-08 20:39:50 +09:00
fleuria
fa71403bc5
nextc(): always return an '\n' at end of input
...
fix #1564
2013-11-08 11:40:26 +08:00
Yukihiro "Matz" Matsumoto
c8936754e8
wrong return value from read_lineno_record()
2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto
677a2ac226
irep->pool not to be GCed
2013-11-07 04:20:46 +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
Yukihiro "Matz" Matsumoto
f80401de6c
resolved conflicts and updated to latest return value change of mrb_generate_code()
2013-11-05 00:13:01 +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
0be572df62
change return value from mrb_generate_code()
2013-11-02 23:20:04 +09:00
Yukihiro "Matz" Matsumoto
92825660ea
changed argument type of mrb_ary_modify(); ref #1554
2013-11-01 09:57:20 +09:00
Yukihiro "Matz" Matsumoto
af03812877
add mrb_ary_modify(mrb,a); you have to ensure mrb_value a to be an array; ref #1554
2013-10-31 23:34:08 +09:00
h2so5
88758e3630
Uniquify the results of Object#methods
2013-10-27 04:04:06 +09:00
Yukihiro "Matz" Matsumoto
a7c9a71684
better error position display
2013-10-15 12:49:41 +09:00
Yukihiro "Matz" Matsumoto
400ccecf0a
add mrb_gv_remove(); untested
2013-10-10 12:12:29 +09:00
Dusan D. Majkic
1228415c97
Remove function delaration not implemented in code
2013-09-28 22:10:44 +02:00
Yukihiro "Matz" Matsumoto
11b0dda641
Merge pull request #1509 from FUKUZAWA-Tadashi/heredoc-bugfix
...
fix bugs on Heredocument
2013-09-25 18:02:00 -07: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
FUKUZAWA-Tadashi
8d34e00102
fix bugs on Heredocument
...
- heredoc in array literal
- heredoc in args
- heredoc in expression expand
2013-09-22 18:14:40 +09:00
Yukihiro "Matz" Matsumoto
3995e7ff8f
rename voidp to cptr
2013-09-21 17:28:47 +09:00