From 01f24ae4c240f17e834cbbc4d5be9d28391fbd7f Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 12 Jul 2007 04:25:46 +0000 Subject: * blockinlining.c: remove "yarv" prefix. * array.c, numeric.c: ditto. * insnhelper.ci, insns.def, vm_evalbody.ci: ditto. * yarvcore.c: removed. * yarvcore.h: renamed to core.h. * cont.c, debug.c, error.c, process.c, signal.c : ditto. * ext/probeprofiler/probeprofiler.c: ditto. * id.c, id.h: added. * inits.c: ditto. * compile.c: rename internal functions. * compile.h: fix debug flag. * eval.c, object.c, vm.c: remove ruby_top_self. use rb_vm_top_self() instead. * eval_intern.h, eval_load: ditto. * gc.c: rename yarv_machine_stack_mark() to rb_gc_mark_machine_stack(). * insnhelper.h: remove unused macros. * iseq.c: add iseq_compile() to create iseq object from source string. * proc.c: rename a internal function. * template/insns.inc.tmpl: remove YARV prefix. * thread.c: * vm.c (rb_iseq_eval): added. * vm.c: move some functions from yarvcore.c. * vm_dump.c: fix to remove compiler warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- id.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 id.c (limited to 'id.c') diff --git a/id.c b/id.c new file mode 100644 index 000000000..46853905f --- /dev/null +++ b/id.c @@ -0,0 +1,68 @@ +/********************************************************************** + + id.c - + + $Author$ + $Date$ + created at: Thu Jul 12 04:37:51 2007 + + Copyright (C) 2004-2006 Koichi Sasada + +**********************************************************************/ + +#include "ruby/ruby.h" + +#define extern +#include "id.h" +#undef extern + +void +Init_id(void) +{ + /* Symbols */ + symIFUNC = ID2SYM(rb_intern("")); + symCFUNC = ID2SYM(rb_intern("")); + + /* IDs */ + idPLUS = rb_intern("+"); + idMINUS = rb_intern("-"); + idMULT = rb_intern("*"); + idDIV = rb_intern("/"); + idMOD = rb_intern("%"); + idLT = rb_intern("<"); + idLTLT = rb_intern("<<"); + idLE = rb_intern("<="); + idGT = rb_intern(">"); + idGE = rb_intern(">="); + idEq = rb_intern("=="); + idEqq = rb_intern("==="); + idBackquote = rb_intern("`"); + idEqTilde = rb_intern("=~"); + + idAREF = rb_intern("[]"); + idASET = rb_intern("[]="); + + idEach = rb_intern("each"); + idTimes = rb_intern("times"); + idLength = rb_intern("length"); + idLambda = rb_intern("lambda"); + idIntern = rb_intern("intern"); + idGets = rb_intern("gets"); + idSucc = rb_intern("succ"); + idEnd = rb_intern("end"); + idRangeEachLT = rb_intern("Range#each#LT"); + idRangeEachLE = rb_intern("Range#each#LE"); + idArrayEach = rb_intern("Array#each"); + idMethodMissing = rb_intern("method_missing"); + + idThrowState = rb_intern("#__ThrowState__"); + + idBitblt = rb_intern("bitblt"); + idAnswer = rb_intern("the_answer_to_life_the_universe_and_everything"); + + idSend = rb_intern("send"); + id__send__ = rb_intern("__send__"); + id__send = rb_intern("__send"); + idFuncall = rb_intern("funcall"); + id__send_bang = rb_intern("__send!"); +} -- cgit