Yukihiro Matsumoto
fc27f71289
add new function mrb_parser_free()
2012-07-03 21:52:11 +09:00
Yukihiro Matsumoto
137570acf0
capture_errors can be specified by mrbc_context
2012-07-03 21:32:37 +09:00
Yukihiro Matsumoto
39689441e7
add context arg to mrb_parser_parse()
2012-07-03 21:13:10 +09:00
Yukihiro Matsumoto
65096c4c1b
add context to parser, that would hold local variable info, filename, and line number. mrbc_context argument has been added to mrb_parse_xxx() functions. Normally, you just to need to add NULL (or 0) to the last argument of the above functions.
2012-07-03 20:59:07 +09:00
Yukihiro Matsumoto
ce49d90dc8
modify compiler API; replace mrb_compie_xxx with mrb_load_xxx() that combines compilatoin and execution
2012-07-03 15:26:11 +09:00
Yukihiro Matsumoto
97b1c57600
constify parser input strings
2012-07-03 14:28:19 +09:00
Yukihiro Matsumoto
3be4e91376
remove size_t from parser
2012-07-03 14:27:34 +09:00
Masamitsu MURASE
2a2ffe7f7d
Modify Kernel#clone and Kernel#dup.
...
Kernel#clone, Kernel#dup:
- 'iv' should not be shared with the original object,
but it should be copied.
Kernel#clone:
- 'mt' of singleton_class should be copied.
2012-06-24 16:39:08 +09:00
Yukihiro Matsumoto
1fa63930fd
check object type before retrieving instance variabls; close #311
2012-06-23 10:40:17 +09:00
Yukihiro Matsumoto
766ae4ee5f
dislose mrb_hash_keys; close #304
2012-06-21 16:27:16 +09:00
Yukihiro Matsumoto
396397bce1
move KHASH_DECLARE to header files
2012-06-21 11:04:36 +09:00
crimsonwoods
cd68190480
split declaration and definition for 'khash_xxx'.
2012-06-19 23:00:29 +09:00
Yukihiro Matsumoto
76f7aecff3
use ENABLE/DISABLE instead of INCLUDE for configuration macro names
2012-06-15 15:34:49 +09:00
Yukihiro Matsumoto
db3d72a471
move RSHIFT from numeric.h to numeric.c
2012-06-13 15:40:41 +09:00
Yukihiro Matsumoto
6a5019d37f
optimized OP_{ADD,SUB,MUL,DIV} to use numeric function for fixnums to handle overflow
2012-06-13 15:38:18 +09:00
Yukihiro Matsumoto
21304086cd
remove khash#kh_debug
2012-06-12 01:41:20 +09:00
SatoshiOdawara
9ecc209ca0
memory leak in kh_resize_##name()
2012-06-07 16:03:53 +09:00
Yukihiro "Matz" Matsumoto
0816c0eba5
Merge pull request #248 from monaka/pr-use-value-i-for-nil-false-check
...
Use value.i for nil/false check.
2012-06-06 22:55:10 -07:00
Masaki Muranaka
e0909fef44
Use value.i for nil/false check.
2012-06-07 09:34:27 +09:00
Yukihiro Matsumoto
1a369de489
remove src/gc.h
2012-06-07 01:18:17 +09:00
Yukihiro Matsumoto
4c01f002fd
mruby/array.h: rename buf to ptr
2012-06-05 23:20:36 +09:00
Yukihiro Matsumoto
e3d17e54f8
mruby/string.h: rename buf to ptr
2012-06-05 23:17:09 +09:00
Yukihiro Matsumoto
e4529c065d
make arrays to share bodies
2012-06-03 23:05:31 +09:00
Yukihiro Matsumoto
28b9619bb4
should decref shared string body on gc_free
2012-06-03 15:45:06 +09:00
Yukihiro Matsumoto
12d75223d6
make shared string to reference-counted C structure to reduce GC pressure
2012-06-03 07:55:39 +09:00
Yukihiro Matsumoto
cc86250297
remove unsafe macros in hash.h
2012-06-03 00:23:59 +09:00
Yukihiro Matsumoto
81c0e2e031
make color in OBJECT_HEADER unsigned
2012-06-02 23:43:13 +09:00
Yukihiro Matsumoto
22568f9a99
Merge branch 'master' of github.com:mruby/mruby
2012-06-02 22:31:58 +09:00
Yukihiro Matsumoto
110cdd82e0
naming convention consistency for hash.h
2012-06-02 21:47:27 +09:00
Yukihiro Matsumoto
de133c3715
refactoring around mrb_hash_new
2012-06-02 21:42:52 +09:00
Yukihiro Matsumoto
d9dfbb044a
remove unused st_hash_end/unit reference
2012-06-02 21:38:44 +09:00
Yukihiro Matsumoto
34c049c63e
remove unused mrb_mem_clear
2012-06-02 21:34:10 +09:00
Yukihiro Matsumoto
92ee53146f
unify long,size_t to int in array.[ch]
2012-06-02 21:30:04 +09:00
Yukihiro Matsumoto
0e46f49aaa
changed prototype mrb_ary_replace to (mrb_state*,mrb_value,mrb_value)
2012-06-02 21:26:30 +09:00
Frank Celler
aeffe3f712
fixed prototype: g++ will complain about definition not being a prototype, should work with GCC and VC as well
2012-06-02 11:54:14 +02:00
Yukihiro Matsumoto
364e6b5a50
symbol table key should be mrb_sym, not int32_t
2012-06-01 09:44:19 +09:00
Yukihiro Matsumoto
1f704552cc
move respond_to and instance_of prototypes to mruby.h
2012-06-01 02:48:19 +09:00
Yukihiro Matsumoto
f56abcbb5a
reorder mrb_ary_new_from_values() args to (argc, argv)
2012-06-01 02:18:30 +09:00
Yukihiro Matsumoto
ae9d9a0781
correctly share string bodies
2012-05-31 22:49:38 +09:00
Yukihiro Matsumoto
a61fe54563
remove unused prototypes
2012-05-31 19:58:40 +09:00
Yukihiro Matsumoto
5a67f22d1c
remove unused str_new_frozen
2012-05-31 19:50:01 +09:00
Yukihiro Matsumoto
326fc888e4
allow string shared body
2012-05-31 19:16:48 +09:00
Yukihiro Matsumoto
64fc4ac332
resolve conflict
2012-05-31 15:32:38 +09:00
Yukihiro Matsumoto
0e5958d404
rename ruby_digitmap to mrb_digitmap
2012-05-30 21:19:04 +09:00
Yukihiro Matsumoto
ad9e841c53
made mrb_get_args() better (optinal args, type checks); close #173 #176
2012-05-24 01:09:36 +09:00
Yukihiro Matsumoto
1eb02552ea
remove unused prototype from hash.h
2012-05-22 18:51:22 +09:00
Yukihiro Matsumoto
c9930d1c32
remove unused MT code from hash.h
2012-05-22 18:49:30 +09:00
Mitchell Blank Jr
9e336b00e5
More C++ compilability work: mrb_obj_alloc void* conversions
...
One of the biggest set of changes needed to make C++ compile, is that you
can't autoconvert "void*" to a different pointer type without a cast (you
can of course, convert pointers *to* "void*"!)
For the first part, convert the users of "mrb_obj_alloc". Since it has
to return something, make it RBasic* (that's what mrb_obj_alloc() is
operating on anyway). This way, even in C you'll get a warning if you
don't cast it.
For places where there are a lot of similar calls to mrb_obj_alloc(),
this can be easily hidden through a macro. I did this in string.c:
#define mrb_obj_alloc_string(mrb) ((struct RString *) mrb_obj_alloc((mrb), MRB_TT_STRING, (mrb)->string_class))
I also updated the mrb_object() macro to also return a RBasic* -- my
previous commit changed that from "void*" -> "RObject*", but I figure
it should be consistent with mrb_obj_alloc()
2012-05-20 09:43:14 -07:00
Mitchell Blank Jr
3471e2b134
C++ compilability - don't define types inside others
...
The following is legal code in both C and C++:
struct foo {
struct bar { int a } x;
int y;
};
...however in C++ it defines a type called "foo::bar" instead of "bar".
Just avoid this construct altogether
2012-05-19 22:40:57 -07:00
Yukihiro Matsumoto
aeca23166b
remove dependency to node.h and pool.h
2012-05-19 15:52:47 +09:00