From 7980e653e57ae5b539533dee1d0b1a00fc16ea5d Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 24 Jun 2007 17:19:22 +0000 Subject: * call_cfunc.ci: removed. * insnhelper.ci: added. this function includes all functions that vm insns need. * common.mk: ditto. * insnhelper.h, vm.h, vm.c: move some declaration. * gc.h: remove GC_CHECK() macro because GC.stress is more useful. * compile.c, iseq.c, vm_dump: ditto. * gc.h, thread.c: move a prototype decalaration. * debug.c, debug.h: rename some functions. * compile.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index d376dc40b3..e84cc827ad 100644 --- a/compile.c +++ b/compile.c @@ -201,8 +201,6 @@ rb_iseq_compile(VALUE self, NODE *node) } } - GC_CHECK(); - if (iseq->type == ISEQ_TYPE_RESCUE || iseq->type == ISEQ_TYPE_ENSURE) { ADD_INSN2(ret, 0, getdynamic, INT2FIX(1), INT2FIX(0)); ADD_INSN1(ret, 0, throw, INT2FIX(0) /* continue throw */ ); @@ -654,24 +652,20 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor) { /* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */ - GC_CHECK(); if (CPDEBUG > 5) dump_disasm_list(FIRST_ELEMENT(anchor)); - GC_CHECK(); debugs("[compile step 3.1 (iseq_optimize)]\n"); iseq_optimize(iseq, anchor); if (CPDEBUG > 5) dump_disasm_list(FIRST_ELEMENT(anchor)); - GC_CHECK(); if (iseq->compile_data->option->instructions_unification) { debugs("[compile step 3.2 (iseq_insns_unification)]\n"); iseq_insns_unification(iseq, anchor); if (CPDEBUG > 5) dump_disasm_list(FIRST_ELEMENT(anchor)); - GC_CHECK(); } if (iseq->compile_data->option->stack_caching) { @@ -679,16 +673,13 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor) set_sequence_stackcaching(iseq, anchor); if (CPDEBUG > 5) dump_disasm_list(FIRST_ELEMENT(anchor)); - GC_CHECK(); } debugs("[compile step 4.1 (set_sequence)]\n"); set_sequence(iseq, anchor); if (CPDEBUG > 5) dump_disasm_list(FIRST_ELEMENT(anchor)); - GC_CHECK(); - GC_CHECK(); debugs("[compile step 4.2 (set_exception_table)]\n"); set_exception_table(iseq); @@ -697,7 +688,6 @@ iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor) debugs("[compile step 5 (iseq_translate_direct_threaded_code)] \n"); iseq_translate_direct_threaded_code(iseq); - GC_CHECK(); if (CPDEBUG > 1) { VALUE str = ruby_iseq_disasm(iseq->self); @@ -949,8 +939,6 @@ set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) int k, pos, sp, stack_max = 0; - GC_CHECK(); - /* set label position */ list = FIRST_ELEMENT(anchor); k = pos = 0; @@ -989,8 +977,6 @@ set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor) generated_iseq = ALLOC_N(VALUE, pos); insn_info_tbl = ALLOC_N(struct insn_info_struct, k); - GC_CHECK(); - list = FIRST_ELEMENT(anchor); k = pos = sp = 0; @@ -2502,8 +2488,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) { int type; - GC_CHECK(); - if (node == 0) { if (!poped) { debug_nodeprint("NODE_NIL(implicit)"); @@ -2527,7 +2511,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) case NODE_METHOD:{ /* OK */ - bp(); COMPILE_ERROR(("BUG: unknown node: NODE_METHOD")); break; } -- cgit v1.2.3