summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 07:49:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-23 07:49:45 +0000
commit619d86d0be63a32379200b64a56809745fb7e236 (patch)
tree1e92b71304d4cb6f6a37bee6b74d659ea43a5aad /eval.c
parentb1a4c1ea5d9b71e9748dc8d920184aae004dcf26 (diff)
downloadruby-619d86d0be63a32379200b64a56809745fb7e236.tar.gz
ruby-619d86d0be63a32379200b64a56809745fb7e236.tar.xz
ruby-619d86d0be63a32379200b64a56809745fb7e236.zip
* include/ruby/node.h, vm_core.h: move definition of
RUBY_VM_METHOD_NODE to node.h. * class.c, common.mk: remove useless inclusion. * compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h. move some definitions from vm_core.h to iseq.h. * compile.c, iseq.c, vm.c: ditto. * eval.c, compile.c: move some functions for parser from eval.c to compile.c. * eval_intern.h, vm_core.h: move va_init_list() macro to vm_core.h. * iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added. * load.c, ruby.c: use rb_iseq_new_top() instead of rb_iseq_new() with ISEQ_TYPE_TOP constant directly. * proc.c: use rb_iseq_first_lineno() instead of accessing iseq structure. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/eval.c b/eval.c
index e2d7cfcfd..ca01e02e8 100644
--- a/eval.c
+++ b/eval.c
@@ -12,6 +12,7 @@
**********************************************************************/
#include "eval_intern.h"
+#include "iseq.h"
VALUE proc_invoke(VALUE, VALUE, VALUE, VALUE);
VALUE rb_binding_new(void);
@@ -1175,56 +1176,3 @@ Init_eval(void)
OBJ_TAINT(exception_error);
OBJ_FREEZE(exception_error);
}
-
-
-/* for parser */
-
-int
-rb_dvar_defined(ID id)
-{
- rb_thread_t *th = GET_THREAD();
- rb_iseq_t *iseq;
- if (th->base_block && (iseq = th->base_block->iseq)) {
- while (iseq->type == ISEQ_TYPE_BLOCK ||
- iseq->type == ISEQ_TYPE_RESCUE ||
- iseq->type == ISEQ_TYPE_ENSURE ||
- iseq->type == ISEQ_TYPE_EVAL) {
- int i;
-
- for (i = 0; i < iseq->local_table_size; i++) {
- if (iseq->local_table[i] == id) {
- return 1;
- }
- }
- iseq = iseq->parent_iseq;
- }
- }
- return 0;
-}
-
-int
-rb_local_defined(ID id)
-{
- rb_thread_t *th = GET_THREAD();
- rb_iseq_t *iseq;
-
- if (th->base_block && th->base_block->iseq) {
- int i;
- iseq = th->base_block->iseq->local_iseq;
-
- for (i=0; i<iseq->local_table_size; i++) {
- if (iseq->local_table[i] == id) {
- return 1;
- }
- }
- }
- return 0;
-}
-
-int
-rb_parse_in_eval(void)
-{
- return GET_THREAD()->parse_in_eval != 0;
-}
-
-