From 5a647a3f5fd011f8558c7f9e90cd65e70e73eb40 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 9 Jun 2008 09:25:32 +0000 Subject: * include/ruby/ruby.h (CONST_ID): constant ID cache for non-gcc. * *.c: no cache in init functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index a62392c3c0..5ac1e6771b 100644 --- a/vm.c +++ b/vm.c @@ -754,22 +754,22 @@ make_localjump_error(const char *mesg, VALUE value, int reason) switch (reason) { case TAG_BREAK: - id = rb_intern("break"); + CONST_ID(id, "break"); break; case TAG_REDO: - id = rb_intern("redo"); + CONST_ID(id, "redo"); break; case TAG_RETRY: - id = rb_intern("retry"); + CONST_ID(id, "retry"); break; case TAG_NEXT: - id = rb_intern("next"); + CONST_ID(id, "next"); break; case TAG_RETURN: - id = rb_intern("return"); + CONST_ID(id, "return"); break; default: - id = rb_intern("noreason"); + CONST_ID(id, "noreason"); break; } rb_iv_set(exc, "@exit_value", value); @@ -1241,7 +1241,7 @@ rb_thread_method_id_and_class(rb_thread_t *th, } while (iseq) { if (RUBY_VM_IFUNC_P(iseq)) { - if (idp) *idp = rb_intern(""); + if (idp) CONST_ID(*idp, ""); if (klassp) *klassp = 0; return 1; } -- cgit v1.2.3