mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge remote-tracking branch 'mruby/master' into array-clear
This commit is contained in:
-24
@@ -1,17 +1,10 @@
|
||||
# /
|
||||
*.bak
|
||||
*.dylib
|
||||
*.inc
|
||||
*.o
|
||||
*.a
|
||||
*.orig
|
||||
*.rej
|
||||
*.sav
|
||||
*.swp
|
||||
*.d
|
||||
*.tmp
|
||||
*.ctmp
|
||||
*.rbtmp
|
||||
*~
|
||||
.DS_Store
|
||||
.ccmalloc
|
||||
@@ -21,20 +14,3 @@ cscope.out
|
||||
/src/y.tab.c
|
||||
/bin
|
||||
/build
|
||||
/mrblib/mrblib.c
|
||||
/mrblib/*.*tmp
|
||||
/mrblib/mrblib.mrb
|
||||
/test/mrbtest
|
||||
/test/mrbtest.c
|
||||
/test/*.*tmp
|
||||
/test/mrubytest.*
|
||||
tools/mrbc/mrbc.mrb
|
||||
CMakeFiles
|
||||
CMakeCache.txt
|
||||
/mrbgems/generator
|
||||
/mrbgems/gem_init.c
|
||||
/mrbgems/g/Makefile
|
||||
/mrbgems/g/MakefileGemList
|
||||
/mrbgems/g/mrbgemtest.ctmp
|
||||
/mrbgems/g/mrbgemtest.rbtmp
|
||||
/mrbgems/g/*/gem_srclib.c
|
||||
|
||||
@@ -16,6 +16,3 @@ test :
|
||||
clean :
|
||||
$(RAKE) clean
|
||||
|
||||
.PHONY : showconfig
|
||||
showconfig :
|
||||
$(RAKE) showconfig
|
||||
|
||||
@@ -19,6 +19,8 @@ load 'tasks/mrbgems.rake'
|
||||
load 'tasks/libmruby.rake'
|
||||
load 'tools/mruby/mruby.rake'
|
||||
load 'tools/mirb/mirb.rake'
|
||||
|
||||
load 'tasks/mrbgems_test.rake'
|
||||
load 'test/mrbtest.rake'
|
||||
|
||||
##############################
|
||||
|
||||
@@ -27,6 +27,10 @@ A remote GIT repository location for a GEM is also supported:
|
||||
conf.gem :git => 'https://github.com/masuidrive/mrbgems-example.git', :branch => 'master'
|
||||
```
|
||||
|
||||
```
|
||||
conf.gem :github => 'masuidrive/mrbgems-example', :branch => 'master'
|
||||
```
|
||||
|
||||
|
||||
## GEM Structure
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# mrbgems
|
||||
*.d
|
||||
gem_init.c
|
||||
gem_test.c
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# mrbgems
|
||||
*.d
|
||||
gem_init.c
|
||||
gem_test.c
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# mrbgems
|
||||
*.d
|
||||
gem_init.c
|
||||
gem_test.c
|
||||
+4
-11
@@ -121,7 +121,10 @@ typedef struct mrb_state {
|
||||
size_t gc_threshold;
|
||||
int gc_interval_ratio;
|
||||
int gc_step_ratio;
|
||||
int gc_disabled;
|
||||
unsigned int gc_disabled:1;
|
||||
unsigned int gc_full:1;
|
||||
unsigned int is_generational_gc_mode:1;
|
||||
size_t majorgc_old_threshold;
|
||||
struct alloca_header *mems;
|
||||
|
||||
mrb_sym symidx;
|
||||
@@ -238,16 +241,6 @@ void mrb_write_barrier(mrb_state *, struct RBasic*);
|
||||
|
||||
#define MRUBY_VERSION "Rite"
|
||||
|
||||
#ifdef DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define DEBUG(x) x
|
||||
#else
|
||||
#define DEBUG(x)
|
||||
#endif
|
||||
|
||||
mrb_value mrb_check_convert_type(mrb_state *mrb, mrb_value val, mrb_int type, const char *tname, const char *method);
|
||||
mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj);
|
||||
const char * mrb_obj_classname(mrb_state *mrb, mrb_value obj);
|
||||
|
||||
@@ -1099,6 +1099,10 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
genop(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0));
|
||||
|
||||
codegen(s, tree->cdr->car, val);
|
||||
if (val && !(tree->cdr->car)) {
|
||||
genop(s, MKOP_A(OP_LOADNIL, cursp()));
|
||||
push();
|
||||
}
|
||||
if (e) {
|
||||
if (val) pop();
|
||||
pos2 = new_label(s);
|
||||
|
||||
@@ -117,8 +117,11 @@ gettimeofday_time(void)
|
||||
return tv.tv_sec + tv.tv_usec * 1e-6;
|
||||
}
|
||||
|
||||
#define GC_INVOKE_TIME_REPORT do {\
|
||||
#define GC_INVOKE_TIME_REPORT(with) do {\
|
||||
fprintf(stderr, "%s\n", with);\
|
||||
fprintf(stderr, "gc_invoke: %19.3f\n", gettimeofday_time() - program_invoke_time);\
|
||||
fprintf(stderr, "is_generational: %d\n", is_generational(mrb));\
|
||||
fprintf(stderr, "is_major_gc: %d\n", is_major_gc(mrb));\
|
||||
} while(0)
|
||||
|
||||
#define GC_TIME_START do {\
|
||||
@@ -129,11 +132,14 @@ gettimeofday_time(void)
|
||||
gc_time = gettimeofday_time() - gc_time;\
|
||||
gc_total_time += gc_time;\
|
||||
fprintf(stderr, "gc_state: %d\n", mrb->gc_state);\
|
||||
fprintf(stderr, "live: %d\n", mrb->live);\
|
||||
fprintf(stderr, "majorgc_old_threshold: %d\n", mrb->majorgc_old_threshold);\
|
||||
fprintf(stderr, "gc_threshold: %d\n", mrb->gc_threshold);\
|
||||
fprintf(stderr, "gc_time: %30.20f\n", gc_time);\
|
||||
fprintf(stderr, "gc_total_time: %30.20f\n\n", gc_total_time);\
|
||||
} while(0)
|
||||
#else
|
||||
#define GC_INVOKE_TIME_REPORT
|
||||
#define GC_INVOKE_TIME_REPORT(s)
|
||||
#define GC_TIME_START
|
||||
#define GC_TIME_STOP_AND_REPORT
|
||||
#endif
|
||||
@@ -141,8 +147,10 @@ gettimeofday_time(void)
|
||||
#ifdef GC_DEBUG
|
||||
#include <assert.h>
|
||||
#define gc_assert(expect) assert(expect)
|
||||
#define DEBUG(x) (x)
|
||||
#else
|
||||
#define gc_assert(expect) ((void)0)
|
||||
#define DEBUG(x)
|
||||
#endif
|
||||
|
||||
#define GC_STEP_SIZE 1024
|
||||
@@ -200,6 +208,7 @@ struct heap_page {
|
||||
struct heap_page *next;
|
||||
struct heap_page *free_next;
|
||||
struct heap_page *free_prev;
|
||||
unsigned int old:1;
|
||||
RVALUE objects[MRB_HEAP_PAGE_SIZE];
|
||||
};
|
||||
|
||||
@@ -268,6 +277,10 @@ add_heap(mrb_state *mrb)
|
||||
|
||||
#define DEFAULT_GC_INTERVAL_RATIO 200
|
||||
#define DEFAULT_GC_STEP_RATIO 200
|
||||
#define DEFAULT_MAJOR_GC_INC_RATIO 200
|
||||
#define is_generational(mrb) (mrb->is_generational_gc_mode)
|
||||
#define is_major_gc(mrb) (is_generational(mrb) && mrb->gc_full)
|
||||
#define is_minor_gc(mrb) (is_generational(mrb) && !mrb->gc_full)
|
||||
|
||||
void
|
||||
mrb_init_heap(mrb_state *mrb)
|
||||
@@ -277,6 +290,8 @@ mrb_init_heap(mrb_state *mrb)
|
||||
add_heap(mrb);
|
||||
mrb->gc_interval_ratio = DEFAULT_GC_INTERVAL_RATIO;
|
||||
mrb->gc_step_ratio = DEFAULT_GC_STEP_RATIO;
|
||||
mrb->is_generational_gc_mode = TRUE;
|
||||
mrb->gc_full = TRUE;
|
||||
|
||||
#ifdef GC_PROFILE
|
||||
program_invoke_time = gettimeofday_time();
|
||||
@@ -485,7 +500,7 @@ mrb_gc_mark(mrb_state *mrb, struct RBasic *obj)
|
||||
{
|
||||
if (obj == 0) return;
|
||||
if (!is_white(obj)) return;
|
||||
gc_assert(!is_dead(mrb, obj));
|
||||
gc_assert((obj)->tt != MRB_TT_FREE);
|
||||
add_gray_list(mrb, obj);
|
||||
}
|
||||
|
||||
@@ -575,8 +590,10 @@ root_scan_phase(mrb_state *mrb)
|
||||
int i, j, e;
|
||||
mrb_callinfo *ci;
|
||||
|
||||
mrb->gray_list = 0;
|
||||
mrb->variable_gray_list = 0;
|
||||
if (!is_minor_gc(mrb)) {
|
||||
mrb->gray_list = 0;
|
||||
mrb->variable_gray_list = 0;
|
||||
}
|
||||
|
||||
mrb_gc_mark_gv(mrb);
|
||||
/* mark arena */
|
||||
@@ -710,13 +727,19 @@ static void
|
||||
final_marking_phase(mrb_state *mrb)
|
||||
{
|
||||
while (mrb->gray_list) {
|
||||
gc_mark_children(mrb, mrb->gray_list);
|
||||
if (is_gray(mrb->gray_list))
|
||||
gc_mark_children(mrb, mrb->gray_list);
|
||||
else
|
||||
mrb->gray_list = mrb->gray_list->gcnext;
|
||||
}
|
||||
gc_assert(mrb->gray_list == NULL);
|
||||
mrb->gray_list = mrb->variable_gray_list;
|
||||
mrb->variable_gray_list = 0;
|
||||
while (mrb->gray_list) {
|
||||
gc_mark_children(mrb, mrb->gray_list);
|
||||
if (is_gray(mrb->gray_list))
|
||||
gc_mark_children(mrb, mrb->gray_list);
|
||||
else
|
||||
mrb->gray_list = mrb->gray_list->gcnext;
|
||||
}
|
||||
gc_assert(mrb->gray_list == NULL);
|
||||
}
|
||||
@@ -742,6 +765,11 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit)
|
||||
int dead_slot = 1;
|
||||
int full = (page->freelist == NULL);
|
||||
|
||||
if (is_minor_gc(mrb) && page->old) {
|
||||
/* skip a slot which doesn't contain any young object */
|
||||
p = e;
|
||||
dead_slot = 0;
|
||||
}
|
||||
while (p<e) {
|
||||
if (is_dead(mrb, &p->as.basic)) {
|
||||
if (p->as.basic.tt != MRB_TT_FREE) {
|
||||
@@ -752,7 +780,8 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit)
|
||||
}
|
||||
}
|
||||
else {
|
||||
paint_partial_white(mrb, &p->as.basic); /* next gc target */
|
||||
if (!is_minor_gc(mrb))
|
||||
paint_partial_white(mrb, &p->as.basic); /* next gc target */
|
||||
dead_slot = 0;
|
||||
}
|
||||
p++;
|
||||
@@ -771,6 +800,10 @@ incremental_sweep_phase(mrb_state *mrb, size_t limit)
|
||||
if (full && freed > 0) {
|
||||
link_free_heap_page(mrb, page);
|
||||
}
|
||||
if (page->freelist == NULL && is_minor_gc(mrb))
|
||||
page->old = TRUE;
|
||||
else
|
||||
page->old = FALSE;
|
||||
page = page->next;
|
||||
}
|
||||
tried_sweep += MRB_HEAP_PAGE_SIZE;
|
||||
@@ -813,20 +846,53 @@ incremental_gc(mrb_state *mrb, size_t limit)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
advance_phase(mrb_state *mrb, enum gc_state to_state)
|
||||
{
|
||||
while (mrb->gc_state != to_state) {
|
||||
incremental_gc(mrb, ~0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
clear_all_old(mrb_state *mrb)
|
||||
{
|
||||
size_t origin_mode = mrb->is_generational_gc_mode;
|
||||
|
||||
gc_assert(is_generational(mrb));
|
||||
if (is_major_gc(mrb)) {
|
||||
advance_phase(mrb, GC_STATE_NONE);
|
||||
}
|
||||
else {
|
||||
mrb->is_generational_gc_mode = FALSE;
|
||||
prepare_incremental_sweep(mrb);
|
||||
advance_phase(mrb, GC_STATE_NONE);
|
||||
}
|
||||
mrb->variable_gray_list = mrb->gray_list = NULL;
|
||||
mrb->is_generational_gc_mode = origin_mode;
|
||||
}
|
||||
|
||||
void
|
||||
mrb_incremental_gc(mrb_state *mrb)
|
||||
{
|
||||
size_t limit = 0, result = 0;
|
||||
|
||||
if (mrb->gc_disabled) return;
|
||||
GC_INVOKE_TIME_REPORT;
|
||||
|
||||
GC_INVOKE_TIME_REPORT("mrb_incremental_gc()");
|
||||
GC_TIME_START;
|
||||
|
||||
limit = (GC_STEP_SIZE/100) * mrb->gc_step_ratio;
|
||||
while (result < limit) {
|
||||
result += incremental_gc(mrb, limit);
|
||||
if (mrb->gc_state == GC_STATE_NONE)
|
||||
break;
|
||||
if (is_minor_gc(mrb)) {
|
||||
do {
|
||||
incremental_gc(mrb, ~0);
|
||||
} while (mrb->gc_state != GC_STATE_NONE);
|
||||
}
|
||||
else {
|
||||
size_t limit = 0, result = 0;
|
||||
limit = (GC_STEP_SIZE/100) * mrb->gc_step_ratio;
|
||||
while (result < limit) {
|
||||
result += incremental_gc(mrb, limit);
|
||||
if (mrb->gc_state == GC_STATE_NONE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mrb->gc_state == GC_STATE_NONE) {
|
||||
@@ -835,6 +901,16 @@ mrb_incremental_gc(mrb_state *mrb)
|
||||
if (mrb->gc_threshold < GC_STEP_SIZE) {
|
||||
mrb->gc_threshold = GC_STEP_SIZE;
|
||||
}
|
||||
if (is_major_gc(mrb)) {
|
||||
mrb->majorgc_old_threshold = mrb->gc_live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
|
||||
mrb->gc_full = FALSE;
|
||||
}
|
||||
else if (is_minor_gc(mrb)) {
|
||||
if (mrb->live > mrb->majorgc_old_threshold) {
|
||||
clear_all_old(mrb);
|
||||
mrb->gc_full = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
mrb->gc_threshold = mrb->live + GC_STEP_SIZE;
|
||||
@@ -850,7 +926,7 @@ mrb_garbage_collect(mrb_state *mrb)
|
||||
size_t max_limit = ~0;
|
||||
|
||||
if (mrb->gc_disabled) return;
|
||||
GC_INVOKE_TIME_REPORT;
|
||||
GC_INVOKE_TIME_REPORT("mrb_garbage_collect()");
|
||||
GC_TIME_START;
|
||||
|
||||
if (mrb->gc_state == GC_STATE_SWEEP) {
|
||||
@@ -860,12 +936,23 @@ mrb_garbage_collect(mrb_state *mrb)
|
||||
}
|
||||
}
|
||||
|
||||
/* clean all black object as old */
|
||||
if (is_generational(mrb)) {
|
||||
clear_all_old(mrb);
|
||||
mrb->gc_full = TRUE;
|
||||
}
|
||||
|
||||
do {
|
||||
incremental_gc(mrb, max_limit);
|
||||
} while (mrb->gc_state != GC_STATE_NONE);
|
||||
|
||||
mrb->gc_threshold = (mrb->gc_live_after_mark/100) * mrb->gc_interval_ratio;
|
||||
|
||||
if (is_generational(mrb)) {
|
||||
mrb->majorgc_old_threshold = mrb->gc_live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
|
||||
mrb->gc_full = FALSE;
|
||||
}
|
||||
|
||||
GC_TIME_STOP_AND_REPORT;
|
||||
}
|
||||
|
||||
@@ -893,9 +980,9 @@ mrb_field_write_barrier(mrb_state *mrb, struct RBasic *obj, struct RBasic *value
|
||||
if (!is_white(value)) return;
|
||||
|
||||
gc_assert(!is_dead(mrb, value) && !is_dead(mrb, obj));
|
||||
gc_assert(mrb->gc_state != GC_STATE_NONE);
|
||||
gc_assert(is_generational(mrb) || mrb->gc_state != GC_STATE_NONE);
|
||||
|
||||
if (mrb->gc_state == GC_STATE_MARK) {
|
||||
if (is_minor_gc(mrb) || mrb->gc_state == GC_STATE_MARK) {
|
||||
add_gray_list(mrb, value);
|
||||
}
|
||||
else {
|
||||
@@ -919,7 +1006,7 @@ mrb_write_barrier(mrb_state *mrb, struct RBasic *obj)
|
||||
if (!is_black(obj)) return;
|
||||
|
||||
gc_assert(!is_dead(mrb, obj));
|
||||
gc_assert(mrb->gc_state != GC_STATE_NONE);
|
||||
gc_assert(is_generational(mrb) || mrb->gc_state != GC_STATE_NONE);
|
||||
paint_gray(obj);
|
||||
obj->gcnext = mrb->variable_gray_list;
|
||||
mrb->variable_gray_list = obj;
|
||||
@@ -1051,6 +1138,73 @@ gc_step_ratio_set(mrb_state *mrb, mrb_value obj)
|
||||
return mrb_nil_value();
|
||||
}
|
||||
|
||||
static void
|
||||
change_gen_gc_mode(mrb_state *mrb, mrb_int enable)
|
||||
{
|
||||
if (is_generational(mrb) && !enable) {
|
||||
if (is_major_gc(mrb)) {
|
||||
advance_phase(mrb, GC_STATE_NONE);
|
||||
}
|
||||
else {
|
||||
clear_all_old(mrb);
|
||||
gc_assert(mrb->gc_state == GC_STATE_NONE);
|
||||
}
|
||||
mrb->gc_full = FALSE;
|
||||
}
|
||||
else if (!is_generational(mrb) && enable) {
|
||||
advance_phase(mrb, GC_STATE_NONE);
|
||||
mrb->majorgc_old_threshold = mrb->gc_live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO;
|
||||
mrb->gc_full = FALSE;
|
||||
}
|
||||
mrb->is_generational_gc_mode = enable;
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* GC.generational_mode -> true or false
|
||||
*
|
||||
* Returns generational or normal gc mode.
|
||||
*
|
||||
*/
|
||||
|
||||
static mrb_value
|
||||
gc_generational_mode_get(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
if (mrb->is_generational_gc_mode)
|
||||
return mrb_true_value();
|
||||
else
|
||||
return mrb_false_value();
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* GC.generational_mode = true or false -> true or false
|
||||
*
|
||||
* Changes to generational or normal gc mode.
|
||||
*
|
||||
*/
|
||||
|
||||
static mrb_value
|
||||
gc_generational_mode_set(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
mrb_value enable;
|
||||
|
||||
mrb_get_args(mrb, "o", &enable);
|
||||
if (mrb->is_generational_gc_mode != mrb_test(enable))
|
||||
change_gen_gc_mode(mrb, mrb_test(enable));
|
||||
|
||||
if (mrb_test(enable))
|
||||
return mrb_true_value();
|
||||
else
|
||||
return mrb_false_value();
|
||||
}
|
||||
|
||||
#ifdef GC_TEST
|
||||
#ifdef GC_DEBUG
|
||||
static mrb_value gc_test(mrb_state *, mrb_value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
mrb_init_gc(mrb_state *mrb)
|
||||
{
|
||||
@@ -1064,6 +1218,13 @@ mrb_init_gc(mrb_state *mrb)
|
||||
mrb_define_class_method(mrb, gc, "interval_ratio=", gc_interval_ratio_set, ARGS_REQ(1));
|
||||
mrb_define_class_method(mrb, gc, "step_ratio", gc_step_ratio_get, ARGS_NONE());
|
||||
mrb_define_class_method(mrb, gc, "step_ratio=", gc_step_ratio_set, ARGS_REQ(1));
|
||||
mrb_define_class_method(mrb, gc, "generational_mode=", gc_generational_mode_set, ARGS_REQ(1));
|
||||
mrb_define_class_method(mrb, gc, "generational_mode", gc_generational_mode_get, ARGS_NONE());
|
||||
#ifdef GC_TEST
|
||||
#ifdef GC_DEBUG
|
||||
mrb_define_class_method(mrb, gc, "test", gc_test, ARGS_NONE());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef GC_TEST
|
||||
@@ -1075,6 +1236,7 @@ test_mrb_field_write_barrier(void)
|
||||
struct RBasic *obj, *value;
|
||||
|
||||
puts("test_mrb_field_write_barrier");
|
||||
mrb->is_generational_gc_mode = FALSE;
|
||||
obj = mrb_basic(mrb_ary_new(mrb));
|
||||
value = mrb_basic(mrb_str_new_cstr(mrb, "value"));
|
||||
paint_black(obj);
|
||||
@@ -1094,7 +1256,7 @@ test_mrb_field_write_barrier(void)
|
||||
mrb_field_write_barrier(mrb, obj, value);
|
||||
|
||||
gc_assert(obj->color & mrb->current_white_part);
|
||||
gc_assert(obj->color & mrb->current_white_part);
|
||||
gc_assert(value->color & mrb->current_white_part);
|
||||
|
||||
|
||||
puts(" fail with black");
|
||||
@@ -1165,6 +1327,7 @@ test_add_gray_list(void)
|
||||
struct RBasic *obj1, *obj2;
|
||||
|
||||
puts("test_add_gray_list");
|
||||
change_gen_gc_mode(mrb, FALSE);
|
||||
gc_assert(mrb->gray_list == NULL);
|
||||
obj1 = mrb_basic(mrb_str_new_cstr(mrb, "test"));
|
||||
add_gray_list(mrb, obj1);
|
||||
@@ -1220,19 +1383,20 @@ test_incremental_gc(void)
|
||||
struct heap_page *page;
|
||||
|
||||
puts("test_incremental_gc");
|
||||
change_gen_gc_mode(mrb, FALSE);
|
||||
|
||||
puts(" in mrb_garbage_collect");
|
||||
mrb_garbage_collect(mrb);
|
||||
|
||||
gc_assert(mrb->gc_state == GC_STATE_NONE);
|
||||
puts(" in GC_STATE_NONE");
|
||||
incremental_gc(mrb, max);
|
||||
gc_assert(mrb->gc_state == GC_STATE_MARK);
|
||||
|
||||
incremental_gc(mrb, max);
|
||||
gc_assert(mrb->gc_state == GC_STATE_MARK);
|
||||
|
||||
incremental_gc(mrb, max);
|
||||
puts(" in GC_STATE_MARK");
|
||||
advance_phase(mrb, GC_STATE_SWEEP);
|
||||
gc_assert(mrb->gc_state == GC_STATE_SWEEP);
|
||||
|
||||
puts(" in GC_STATE_SWEEP");
|
||||
page = mrb->heaps;
|
||||
while (page) {
|
||||
RVALUE *p = page->objects;
|
||||
@@ -1267,6 +1431,28 @@ test_incremental_gc(void)
|
||||
gc_assert(mrb->live == live);
|
||||
gc_assert(mrb->live == total-freed);
|
||||
|
||||
puts("test_incremental_gc(gen)");
|
||||
advance_phase(mrb, GC_STATE_SWEEP);
|
||||
change_gen_gc_mode(mrb, TRUE);
|
||||
|
||||
gc_assert(mrb->gc_full == FALSE);
|
||||
gc_assert(mrb->gc_state == GC_STATE_NONE);
|
||||
|
||||
puts(" in minor");
|
||||
gc_assert(is_minor_gc(mrb));
|
||||
gc_assert(mrb->majorgc_old_threshold > 0);
|
||||
mrb->majorgc_old_threshold = 0;
|
||||
mrb_incremental_gc(mrb);
|
||||
gc_assert(mrb->gc_full == TRUE);
|
||||
gc_assert(mrb->gc_state == GC_STATE_NONE);
|
||||
|
||||
puts(" in major");
|
||||
gc_assert(is_major_gc(mrb));
|
||||
do {
|
||||
mrb_incremental_gc(mrb);
|
||||
} while (mrb->gc_state != GC_STATE_NONE);
|
||||
gc_assert(mrb->gc_full == FALSE);
|
||||
|
||||
mrb_close(mrb);
|
||||
}
|
||||
|
||||
@@ -1290,63 +1476,8 @@ test_incremental_sweep_phase(void)
|
||||
mrb_close(mrb);
|
||||
}
|
||||
|
||||
void
|
||||
test_gc_api(void)
|
||||
{
|
||||
mrb_state *mrb = mrb_open();
|
||||
mrb_value res;
|
||||
|
||||
mrb_value argv[1];
|
||||
|
||||
puts("test_gc_api");
|
||||
|
||||
gc_start(mrb, mrb_nil_value());
|
||||
|
||||
res = gc_interval_ratio_get(mrb, mrb_nil_value());
|
||||
gc_assert(mrb_fixnum(res) == 200);
|
||||
|
||||
argv[0] = mrb_fixnum_value(300);
|
||||
mrb->argv = &argv;
|
||||
mrb->argc = 1;
|
||||
|
||||
gc_interval_ratio_set(mrb, mrb_nil_value());
|
||||
res = gc_interval_ratio_get(mrb, mrb_nil_value());
|
||||
gc_assert(mrb_fixnum(res) == 300);
|
||||
|
||||
res = gc_step_ratio_get(mrb, mrb_nil_value());
|
||||
gc_assert(mrb_fixnum(res) == 200);
|
||||
|
||||
gc_step_ratio_set(mrb, mrb_nil_value());
|
||||
res = gc_step_ratio_get(mrb, mrb_nil_value());
|
||||
gc_assert(mrb_fixnum(res) == 300);
|
||||
|
||||
mrb_close(mrb);
|
||||
}
|
||||
|
||||
static void
|
||||
test_many_object_benchmark(void)
|
||||
{
|
||||
mrb_state *mrb = mrb_open();
|
||||
size_t i = 0, j=0;
|
||||
mrb_value ary = mrb_ary_new(mrb);
|
||||
int save_point = mrb_gc_arena_save(mrb);
|
||||
|
||||
puts("test_many_object_benchmark");
|
||||
|
||||
for (i=0; i<1000; i++) {
|
||||
mrb_value cary = mrb_ary_new(mrb);
|
||||
mrb_ary_push(mrb, ary, cary);
|
||||
for (j=0; j<1000; j++) {
|
||||
mrb_ary_push(mrb, cary, mrb_str_new_cstr(mrb, "t"));
|
||||
}
|
||||
mrb_gc_arena_restore(mrb, save_point);
|
||||
}
|
||||
|
||||
mrb_close(mrb);
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
static mrb_value
|
||||
gc_test(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
test_mrb_field_write_barrier();
|
||||
test_mrb_write_barrier();
|
||||
@@ -1354,9 +1485,7 @@ main(void)
|
||||
test_gc_gray_mark();
|
||||
test_incremental_gc();
|
||||
test_incremental_sweep_phase();
|
||||
test_gc_api();
|
||||
test_many_object_benchmark();
|
||||
return 0;
|
||||
return mrb_nil_value();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -710,6 +710,7 @@ mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_value v)
|
||||
iv_tbl *t = c->iv;
|
||||
|
||||
if (iv_get(mrb, t, sym, NULL)) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)c);
|
||||
iv_put(mrb, t, sym, v);
|
||||
return;
|
||||
}
|
||||
@@ -721,6 +722,7 @@ mrb_mod_cv_set(mrb_state *mrb, struct RClass * c, mrb_sym sym, mrb_value v)
|
||||
cls->iv = iv_new(mrb);
|
||||
}
|
||||
|
||||
mrb_write_barrier(mrb, (struct RBasic*)cls);
|
||||
iv_put(mrb, cls->iv, sym, v);
|
||||
}
|
||||
|
||||
@@ -771,6 +773,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
|
||||
iv_tbl *t = c->iv;
|
||||
|
||||
if (iv_get(mrb, t, sym, NULL)) {
|
||||
mrb_write_barrier(mrb, (struct RBasic*)c);
|
||||
iv_put(mrb, t, sym, v);
|
||||
return;
|
||||
}
|
||||
@@ -781,6 +784,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
|
||||
if (!c->iv) {
|
||||
c->iv = iv_new(mrb);
|
||||
}
|
||||
mrb_write_barrier(mrb, (struct RBasic*)c);
|
||||
iv_put(mrb, c->iv, sym, v);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,11 @@ The value below allows about 60000 recursive calls in the simplest case. */
|
||||
#define MRB_STACK_MAX ((1<<18) - MRB_STACK_GROWTH)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VM_DEBUG
|
||||
# define DEBUG(x) (x)
|
||||
#else
|
||||
# define DEBUG(x)
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
dir = File.dirname(__FILE__).sub(%r|^\./|, '')
|
||||
|
||||
MRuby.each_target do
|
||||
gems.each do |g|
|
||||
test_rbc = "#{g.build_dir}/gem_test.c"
|
||||
test_rbobj = test_rbc.ext('o')
|
||||
|
||||
Rake::FileTask.define_task g.testlib => g.test_objs + [test_rbobj] do |t|
|
||||
g.build.archive t.name, 'rs', t.prerequisites
|
||||
end
|
||||
|
||||
Rake::FileTask.define_task test_rbobj => test_rbc
|
||||
Rake::FileTask.define_task test_rbc => g.test_rbfiles + [g.build.mrbcfile, "#{build_dir}/lib/libmruby.a"] do |t|
|
||||
open(t.name, 'w') do |f|
|
||||
f.puts g.gem_init_header
|
||||
g.build.compile_mruby f, g.test_preload, "gem_test_irep_#{g.funcname}_preload"
|
||||
g.test_rbfiles.each_with_index do |rbfile, i|
|
||||
g.build.compile_mruby f, rbfile, "gem_test_irep_#{g.funcname}_#{i}"
|
||||
end
|
||||
f.puts %Q[void mrb_#{g.funcname}_gem_test(mrb_state *mrb);] unless g.test_objs.empty?
|
||||
f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb) {]
|
||||
f.puts %Q[ mrb_state *mrb2;]
|
||||
f.puts %Q[ mrb_value val1, val2, ary1, ary2;]
|
||||
f.puts %Q[ int ai;]
|
||||
unless g.test_rbfiles.empty?
|
||||
g.test_rbfiles.count.times do |i|
|
||||
f.puts %Q[ ai = mrb_gc_arena_save(mrb);]
|
||||
f.puts %Q[ mrb2 = mrb_open();]
|
||||
f.puts %Q[ mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_preload);]
|
||||
f.puts %Q[ if (mrb2->exc) {]
|
||||
f.puts %Q[ mrb_p(mrb2, mrb_obj_value(mrb2->exc));]
|
||||
f.puts %Q[ exit(0);]
|
||||
f.puts %Q[ }]
|
||||
f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
|
||||
|
||||
f.puts %Q[ mrb_#{g.funcname}_gem_test(mrb2);] unless g.test_objs.empty?
|
||||
|
||||
f.puts %Q[ mrb_load_irep(mrb2, gem_test_irep_#{g.funcname}_#{i});]
|
||||
f.puts %Q[ if (mrb2->exc) {]
|
||||
f.puts %Q[ mrb_p(mrb2, mrb_obj_value(mrb2->exc));]
|
||||
f.puts %Q[ exit(0);]
|
||||
f.puts %Q[ }]
|
||||
f.puts %Q[ ]
|
||||
|
||||
%w(ok_test ko_test kill_test).each do |vname|
|
||||
f.puts %Q[ val1 = mrb_gv_get(mrb2, mrb_intern(mrb, "$#{vname}"));]
|
||||
f.puts %Q[ if(mrb_fixnum_p(val1)) {]
|
||||
f.puts %Q[ val2 = mrb_gv_get(mrb, mrb_intern(mrb, "$#{vname}"));]
|
||||
f.puts %Q[ mrb_gv_set(mrb, mrb_intern(mrb, "$#{vname}"), mrb_fixnum_value(mrb_fixnum(val1) + mrb_fixnum(val2)));]
|
||||
f.puts %Q[ }\n]
|
||||
end
|
||||
|
||||
f.puts %Q[ ary2 = mrb_gv_get(mrb2, mrb_intern(mrb2, "$asserts"));]
|
||||
f.puts %Q[ if(mrb_test(ary2)) {]
|
||||
f.puts %Q[ ary1 = mrb_gv_get(mrb, mrb_intern(mrb, "$asserts"));]
|
||||
f.puts %Q[ val2 = mrb_ary_shift(mrb2, ary2);]
|
||||
f.puts %Q[ ]
|
||||
f.puts %Q[ while(mrb_test(val2)) {]
|
||||
f.puts %Q[ char *str = mrb_string_value_cstr(mrb2, &val2);]
|
||||
f.puts %Q[ mrb_ary_push(mrb, ary1, mrb_str_new(mrb, str, strlen(str)));]
|
||||
f.puts %Q[ val2 = mrb_ary_shift(mrb2, ary2);]
|
||||
f.puts %Q[ }]
|
||||
f.puts %Q[ }]
|
||||
f.puts %Q[ mrb_close(mrb2);]
|
||||
f.puts %Q[ mrb_gc_arena_restore(mrb, ai);]
|
||||
end
|
||||
end
|
||||
f.puts %Q[}]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -67,6 +67,10 @@ module MRuby
|
||||
end
|
||||
|
||||
def load_external_gem(params)
|
||||
if params[:github]
|
||||
params[:git] = "git@github.com:#{params[:github]}.git"
|
||||
end
|
||||
|
||||
if params[:git]
|
||||
url = params[:git]
|
||||
gemdir = "build/mrbgems/#{url.match(/([-_\w]+)(\.[-_\w]+|)$/).to_a[1]}"
|
||||
|
||||
+10
-35
@@ -22,7 +22,7 @@ module MRuby
|
||||
attr_array :licenses, :authors
|
||||
alias :license= :licenses=
|
||||
alias :author= :authors=
|
||||
attr_array :cflags
|
||||
attr_array :cflags, :cxxflags, :objcflags, :asmflags
|
||||
attr_array :mruby_cflags, :mruby_includes, :mruby_ldflags, :mruby_libs
|
||||
|
||||
attr_array :rbfiles, :objs
|
||||
@@ -66,46 +66,15 @@ module MRuby
|
||||
end
|
||||
|
||||
def build_dir
|
||||
return @build_dir if @build_dir
|
||||
@build_dir = "#{build.build_dir}/mrbgems/#{name}"
|
||||
@build_dir ||= "#{build.build_dir}/mrbgems/#{name}"
|
||||
FileUtils.mkdir_p @build_dir
|
||||
@build_dir
|
||||
end
|
||||
|
||||
def add_tasks
|
||||
test_rbc = "#{build_dir}/gem_test.c"
|
||||
test_rbobj = test_rbc.ext('o')
|
||||
|
||||
Rake::FileTask.define_task testlib => test_objs + [test_rbobj] do |t|
|
||||
build.archive t.name, 'rs', t.prerequisites
|
||||
end
|
||||
|
||||
Rake::FileTask.define_task test_rbobj => test_rbc
|
||||
Rake::FileTask.define_task test_rbc => [build.mrbcfile] + test_rbfiles do |t|
|
||||
open(t.name, 'w') do |f|
|
||||
f.puts gem_init_header
|
||||
build.compile_mruby f, test_rbfiles, "gem_test_irep_#{funcname}" unless test_rbfiles.empty?
|
||||
end
|
||||
|
||||
open(t.name, 'a') do |f|
|
||||
f.puts "void mrb_#{funcname}_gem_test(mrb_state *mrb);" unless test_objs.empty?
|
||||
f.puts "void GENERATED_TMP_mrb_#{funcname}_gem_test(mrb_state *mrb) {"
|
||||
f.puts " mrb_#{funcname}_gem_test(mrb);" unless test_objs.empty?
|
||||
f.puts <<__EOF__ unless test_rbfiles.empty?
|
||||
mrb_load_irep(mrb, gem_test_irep_#{funcname});
|
||||
if (mrb->exc) {
|
||||
mrb_p(mrb, mrb_obj_value(mrb->exc));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
__EOF__
|
||||
f.puts "}"
|
||||
end
|
||||
end
|
||||
|
||||
Rake::FileTask.define_task "#{build_dir}/gem_init.o" => "#{build_dir}/gem_init.c"
|
||||
Rake::FileTask.define_task "#{build_dir}/gem_init.c" => [build.mrbcfile] + rbfiles do |t|
|
||||
generate_gem_init(t.name)
|
||||
generate_gem_init("#{build_dir}/gem_init.c")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -149,6 +118,7 @@ __EOF__
|
||||
build.compile_mruby f, rbfiles, "gem_mrblib_irep_#{funcname}" unless rbfiles.empty?
|
||||
f.puts "void mrb_#{funcname}_gem_init(mrb_state *mrb);"
|
||||
f.puts "void GENERATED_TMP_mrb_#{funcname}_gem_init(mrb_state *mrb) {"
|
||||
f.puts " int ai = mrb_gc_arena_save(mrb);"
|
||||
f.puts " mrb_#{funcname}_gem_init(mrb);" if objs != ["#{build_dir}/gem_init.o"]
|
||||
f.puts <<__EOF__ unless rbfiles.empty?
|
||||
mrb_load_irep(mrb, gem_mrblib_irep_#{funcname});
|
||||
@@ -158,6 +128,8 @@ __EOF__
|
||||
}
|
||||
|
||||
__EOF__
|
||||
f.puts " mrb_gc_arena_restore(mrb, ai);"
|
||||
|
||||
f.puts "}"
|
||||
end
|
||||
end # generate_gem_init
|
||||
@@ -177,9 +149,12 @@ __EOF__
|
||||
#include "mruby/dump.h"
|
||||
#include "mruby/string.h"
|
||||
#include "mruby/proc.h"
|
||||
#include "mruby/variable.h"
|
||||
#include "mruby/array.h"
|
||||
#include "mruby/string.h"
|
||||
__EOF__
|
||||
end # gem_init_header
|
||||
|
||||
end # Specification
|
||||
end # Gem
|
||||
end # MRuby
|
||||
end # MRuby
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
def get_dependencies(file)
|
||||
file = file.pathmap('%n.d') unless File.extname(file) == '.d'
|
||||
file = file.ext('d') unless File.extname(file) == '.d'
|
||||
if File.exists?(file)
|
||||
File.read(file).gsub("\\\n ", "").scan(/^\S+:\s+(.+)$/).flatten.map {|s| s.split(' ') }.flatten
|
||||
else
|
||||
|
||||
+12
-18
@@ -5,14 +5,13 @@ $asserts = []
|
||||
$test_start = Time.now if Object.const_defined?(:Time)
|
||||
|
||||
##
|
||||
# Print the assertion in a readable way
|
||||
def print_assertion_string(str, iso)
|
||||
print(str)
|
||||
if(iso != '')
|
||||
print(' [')
|
||||
print(iso)
|
||||
print(']')
|
||||
end
|
||||
# Create the assertion in a readable way
|
||||
def assertion_string(err, str, iso=nil, e=nil)
|
||||
msg = "#{err}#{str}"
|
||||
msg += " [#{iso}]" if iso && iso != ''
|
||||
msg += " => #{e.message}" if e
|
||||
msg += " (mrbgems: #{GEMNAME})" if Object.const_defined?(:GEMNAME)
|
||||
msg
|
||||
end
|
||||
|
||||
##
|
||||
@@ -26,7 +25,7 @@ end
|
||||
def assert(str = 'Assertion failed', iso = '')
|
||||
begin
|
||||
if(!yield)
|
||||
$asserts.push(['Fail: ', str, iso])
|
||||
$asserts.push(assertion_string('Fail: ', str, iso))
|
||||
$ko_test += 1
|
||||
print('F')
|
||||
else
|
||||
@@ -34,7 +33,7 @@ def assert(str = 'Assertion failed', iso = '')
|
||||
print('.')
|
||||
end
|
||||
rescue Exception => e
|
||||
$asserts.push(['Error: ', str, iso, e])
|
||||
$asserts.push(assertion_string('Error: ', str, iso, e))
|
||||
$kill_test += 1
|
||||
print('X')
|
||||
end
|
||||
@@ -45,14 +44,9 @@ end
|
||||
# which were reported broken.
|
||||
def report()
|
||||
print "\n"
|
||||
$asserts.each do |err, str, iso, e|
|
||||
print(err);
|
||||
print_assertion_string(str, iso)
|
||||
if e
|
||||
print(" => ")
|
||||
print(e.message)
|
||||
end
|
||||
print("\n")
|
||||
|
||||
$asserts.each do |msg|
|
||||
puts msg
|
||||
end
|
||||
|
||||
$total_test = $ok_test.+($ko_test)
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ MRuby.each_target do
|
||||
objs = ["#{build_dir}/#{dir}/driver.o", mlib]
|
||||
|
||||
file exec => objs + gems.map{ |g| g.testlib } + ["#{build_dir}/lib/libmruby.a"] do |t|
|
||||
link t.name, t.prerequisites, [], gems.map { |g| g.mruby_libs }
|
||||
link t.name, t.prerequisites, gems.map { |g| g.mruby_ldflags }, gems.map { |g| g.mruby_libs }
|
||||
end
|
||||
|
||||
file mlib => [clib]
|
||||
@@ -29,4 +29,4 @@ MRuby.each_target do
|
||||
f.puts "}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Not ISO specified
|
||||
|
||||
assert('GC.enable') do
|
||||
GC.disable == false
|
||||
GC.enable == true
|
||||
GC.enable == false
|
||||
end
|
||||
|
||||
assert('GC.disable') do
|
||||
begin
|
||||
GC.disable == false
|
||||
GC.disable == true
|
||||
ensure
|
||||
GC.enable
|
||||
end
|
||||
end
|
||||
|
||||
assert('GC.interval_ratio=') do
|
||||
origin = GC.interval_ratio
|
||||
begin
|
||||
(GC.interval_ratio = 150) == 150
|
||||
ensure
|
||||
GC.interval_ratio = origin
|
||||
end
|
||||
end
|
||||
|
||||
assert('GC.step_ratio=') do
|
||||
origin = GC.step_ratio
|
||||
begin
|
||||
(GC.step_ratio = 150) == 150
|
||||
ensure
|
||||
GC.step_ratio = origin
|
||||
end
|
||||
end
|
||||
|
||||
assert('GC.generational_mode=') do
|
||||
origin = GC.generational_mode
|
||||
begin
|
||||
(GC.generational_mode = false) == false
|
||||
(GC.generational_mode = true) == true
|
||||
(GC.generational_mode = true) == true
|
||||
ensure
|
||||
GC.generational_mode = origin
|
||||
end
|
||||
end
|
||||
@@ -5,6 +5,6 @@ MRuby.each_target do
|
||||
objs = Dir.glob("#{dir}/*.{c}").map { |f| f.pathmap("#{build_dir}/%X.o") }
|
||||
|
||||
file exec => objs + ["#{build_dir}/lib/libmruby.a"] do |t|
|
||||
link t.name, t.prerequisites, [], gems.map { |g| g.mruby_libs }
|
||||
link t.name, t.prerequisites, gems.map { |g| g.mruby_ldflags }, gems.map { |g| g.mruby_libs }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,4 +7,4 @@ MRuby.each_target do
|
||||
file exec => objs + ["#{build_dir}/lib/libmruby_core.a"] do |t|
|
||||
link t.name, t.prerequisites, [], gems.map { |g| g.mruby_libs }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,6 +5,6 @@ MRuby.each_target do
|
||||
objs = Dir.glob("#{dir}/*.{c}").map { |f| f.pathmap("#{build_dir}/%X.o") }
|
||||
|
||||
file exec => objs + ["#{build_dir}/lib/libmruby.a"] do |t|
|
||||
link t.name, t.prerequisites, [], gems.map { |g| g.mruby_libs }
|
||||
link t.name, t.prerequisites, gems.map { |g| g.mruby_ldflags }, gems.map { |g| g.mruby_libs }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
xcuserdata
|
||||
build/
|
||||
bin/
|
||||
lib/
|
||||
DerivedData/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:mruby.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0440"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B3215769F3000113BFB"
|
||||
BuildableName = "mirb"
|
||||
BlueprintName = "mirb"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8844358E1577301B007F95A4"
|
||||
BuildableName = "mrbtest"
|
||||
BlueprintName = "mrbtest"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B3215769F3000113BFB"
|
||||
BuildableName = "mirb"
|
||||
BlueprintName = "mirb"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "CLANGDebug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0440"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88BF3594156CA10D00F12AC7"
|
||||
BuildableName = "make_mruby"
|
||||
BlueprintName = "make_mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,114 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0440"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B3215769F3000113BFB"
|
||||
BuildableName = "mirb"
|
||||
BlueprintName = "mirb"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8844358E1577301B007F95A4"
|
||||
BuildableName = "mrbtest"
|
||||
BlueprintName = "mrbtest"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8844358E1577301B007F95A4"
|
||||
BuildableName = "mrbtest"
|
||||
BlueprintName = "mrbtest"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B2315769E6100113BFB"
|
||||
BuildableName = "mruby"
|
||||
BlueprintName = "mruby"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "CLANGDebug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0440"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760B731576A33100113BFB"
|
||||
BuildableName = "mruby.framework"
|
||||
BlueprintName = "mruby_fw"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8844358E1577301B007F95A4"
|
||||
BuildableName = "mrbtest"
|
||||
BlueprintName = "mrbtest"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8844358E1577301B007F95A4"
|
||||
BuildableName = "mrbtest"
|
||||
BlueprintName = "mrbtest"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "CLANGDebug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0440"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "88760AA115759B4F00113BFB"
|
||||
BuildableName = "libmruby.a"
|
||||
BlueprintName = "ruby_lib"
|
||||
ReferencedContainer = "container:mruby.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "CLANGDebug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,2 +0,0 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.github.mruby.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012 mruby Authors. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,7 +0,0 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'mruby_fw' target in the 'mruby_fw' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
Reference in New Issue
Block a user