From 1bebb22ce16c6129a805adad83e0f1e29f3874a0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 26 Sep 2012 09:34:46 +0000 Subject: * insns.def: add new instruction `opt_empty_p' for optimize `empty?' method. Apply a patch proposed at [ruby-dev:46120] [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita). * compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h: ditto. * id.c, template/id.h.tmpl: ditto. * test/ruby/test_optimization.rb: test for this changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- id.c | 1 + 1 file changed, 1 insertion(+) (limited to 'id.c') diff --git a/id.c b/id.c index e5f971d3e2..b6143971a1 100644 --- a/id.c +++ b/id.c @@ -41,6 +41,7 @@ Init_id(void) REGISTER_SYMID(idEach, "each"); REGISTER_SYMID(idLength, "length"); REGISTER_SYMID(idSize, "size"); + REGISTER_SYMID(idEmptyP, "empty?"); REGISTER_SYMID(idLambda, "lambda"); REGISTER_SYMID(idIntern, "intern"); REGISTER_SYMID(idGets, "gets"); -- cgit v1.2.3