summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 04:09:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 04:09:56 +0000
commita9ba30ee8661fbbb01f79a923cef70e2aa050a06 (patch)
tree9e3699a352b53e31647c1a2b407c524b040e4288 /iseq.c
parentee8f40b5a62a15298c668b57b3504e177289972c (diff)
* common.mk (node_name.inc): auto-generate node name list.
* iseq.c (ruby_node_name): ditto. * tool/node_name.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c231
1 files changed, 1 insertions, 230 deletions
diff --git a/iseq.c b/iseq.c
index c50a6d4..7e65249 100644
--- a/iseq.c
+++ b/iseq.c
@@ -853,236 +853,7 @@ const char *
ruby_node_name(int node)
{
switch (node) {
-/*
-# generated by this script.
-src = 'include/ruby/node.h'
-f = open(File.expand_path(src))
-line = f.gets while /enum node_type \{/ !~ line
-while line = f.gets
- break if /(NODE_.+),/ !~ line
- node = $1
- puts " case #{node}:"
- puts "\treturn \"#{node}\";"
-end
- */
- case NODE_METHOD:
- return "NODE_METHOD";
- case NODE_FBODY:
- return "NODE_FBODY";
- case NODE_CFUNC:
- return "NODE_CFUNC";
- case NODE_SCOPE:
- return "NODE_SCOPE";
- case NODE_BLOCK:
- return "NODE_BLOCK";
- case NODE_IF:
- return "NODE_IF";
- case NODE_CASE:
- return "NODE_CASE";
- case NODE_WHEN:
- return "NODE_WHEN";
- case NODE_OPT_N:
- return "NODE_OPT_N";
- case NODE_WHILE:
- return "NODE_WHILE";
- case NODE_UNTIL:
- return "NODE_UNTIL";
- case NODE_ITER:
- return "NODE_ITER";
- case NODE_FOR:
- return "NODE_FOR";
- case NODE_BREAK:
- return "NODE_BREAK";
- case NODE_NEXT:
- return "NODE_NEXT";
- case NODE_REDO:
- return "NODE_REDO";
- case NODE_RETRY:
- return "NODE_RETRY";
- case NODE_BEGIN:
- return "NODE_BEGIN";
- case NODE_RESCUE:
- return "NODE_RESCUE";
- case NODE_RESBODY:
- return "NODE_RESBODY";
- case NODE_ENSURE:
- return "NODE_ENSURE";
- case NODE_AND:
- return "NODE_AND";
- case NODE_OR:
- return "NODE_OR";
- case NODE_NOT:
- return "NODE_NOT";
- case NODE_MASGN:
- return "NODE_MASGN";
- case NODE_LASGN:
- return "NODE_LASGN";
- case NODE_DASGN:
- return "NODE_DASGN";
- case NODE_DASGN_CURR:
- return "NODE_DASGN_CURR";
- case NODE_GASGN:
- return "NODE_GASGN";
- case NODE_IASGN:
- return "NODE_IASGN";
- case NODE_IASGN2:
- return "NODE_IASGN2";
- case NODE_CDECL:
- return "NODE_CDECL";
- case NODE_CVASGN:
- return "NODE_CVASGN";
- case NODE_CVDECL:
- return "NODE_CVDECL";
- case NODE_OP_ASGN1:
- return "NODE_OP_ASGN1";
- case NODE_OP_ASGN2:
- return "NODE_OP_ASGN2";
- case NODE_OP_ASGN_AND:
- return "NODE_OP_ASGN_AND";
- case NODE_OP_ASGN_OR:
- return "NODE_OP_ASGN_OR";
- case NODE_CALL:
- return "NODE_CALL";
- case NODE_FCALL:
- return "NODE_FCALL";
- case NODE_VCALL:
- return "NODE_VCALL";
- case NODE_SUPER:
- return "NODE_SUPER";
- case NODE_ZSUPER:
- return "NODE_ZSUPER";
- case NODE_ARRAY:
- return "NODE_ARRAY";
- case NODE_ZARRAY:
- return "NODE_ZARRAY";
- case NODE_VALUES:
- return "NODE_VALUES";
- case NODE_HASH:
- return "NODE_HASH";
- case NODE_RETURN:
- return "NODE_RETURN";
- case NODE_YIELD:
- return "NODE_YIELD";
- case NODE_LVAR:
- return "NODE_LVAR";
- case NODE_DVAR:
- return "NODE_DVAR";
- case NODE_GVAR:
- return "NODE_GVAR";
- case NODE_IVAR:
- return "NODE_IVAR";
- case NODE_CONST:
- return "NODE_CONST";
- case NODE_CVAR:
- return "NODE_CVAR";
- case NODE_NTH_REF:
- return "NODE_NTH_REF";
- case NODE_BACK_REF:
- return "NODE_BACK_REF";
- case NODE_MATCH:
- return "NODE_MATCH";
- case NODE_MATCH2:
- return "NODE_MATCH2";
- case NODE_MATCH3:
- return "NODE_MATCH3";
- case NODE_LIT:
- return "NODE_LIT";
- case NODE_STR:
- return "NODE_STR";
- case NODE_DSTR:
- return "NODE_DSTR";
- case NODE_XSTR:
- return "NODE_XSTR";
- case NODE_DXSTR:
- return "NODE_DXSTR";
- case NODE_EVSTR:
- return "NODE_EVSTR";
- case NODE_DREGX:
- return "NODE_DREGX";
- case NODE_DREGX_ONCE:
- return "NODE_DREGX_ONCE";
- case NODE_ARGS:
- return "NODE_ARGS";
- case NODE_ARGS_AUX:
- return "NODE_ARGS_AUX";
- case NODE_OPT_ARG:
- return "NODE_OPT_ARG";
- case NODE_POSTARG:
- return "NODE_POSTARG";
- case NODE_ARGSCAT:
- return "NODE_ARGSCAT";
- case NODE_ARGSPUSH:
- return "NODE_ARGSPUSH";
- case NODE_SPLAT:
- return "NODE_SPLAT";
- case NODE_TO_ARY:
- return "NODE_TO_ARY";
- case NODE_BLOCK_ARG:
- return "NODE_BLOCK_ARG";
- case NODE_BLOCK_PASS:
- return "NODE_BLOCK_PASS";
- case NODE_DEFN:
- return "NODE_DEFN";
- case NODE_DEFS:
- return "NODE_DEFS";
- case NODE_ALIAS:
- return "NODE_ALIAS";
- case NODE_VALIAS:
- return "NODE_VALIAS";
- case NODE_UNDEF:
- return "NODE_UNDEF";
- case NODE_CLASS:
- return "NODE_CLASS";
- case NODE_MODULE:
- return "NODE_MODULE";
- case NODE_SCLASS:
- return "NODE_SCLASS";
- case NODE_COLON2:
- return "NODE_COLON2";
- case NODE_COLON3:
- return "NODE_COLON3";
- case NODE_DOT2:
- return "NODE_DOT2";
- case NODE_DOT3:
- return "NODE_DOT3";
- case NODE_FLIP2:
- return "NODE_FLIP2";
- case NODE_FLIP3:
- return "NODE_FLIP3";
- case NODE_ATTRSET:
- return "NODE_ATTRSET";
- case NODE_SELF:
- return "NODE_SELF";
- case NODE_NIL:
- return "NODE_NIL";
- case NODE_TRUE:
- return "NODE_TRUE";
- case NODE_FALSE:
- return "NODE_FALSE";
- case NODE_ERRINFO:
- return "NODE_ERRINFO";
- case NODE_DEFINED:
- return "NODE_DEFINED";
- case NODE_POSTEXE:
- return "NODE_POSTEXE";
- case NODE_ALLOCA:
- return "NODE_ALLOCA";
- case NODE_BMETHOD:
- return "NODE_BMETHOD";
- case NODE_MEMO:
- return "NODE_MEMO";
- case NODE_IFUNC:
- return "NODE_IFUNC";
- case NODE_DSYM:
- return "NODE_DSYM";
- case NODE_ATTRASGN:
- return "NODE_ATTRASGN";
- case NODE_PRELUDE:
- return "NODE_PRELUDE";
- case NODE_LAMBDA:
- return "NODE_LAMBDA";
- case NODE_OPTBLOCK:
- return "NODE_OPTBLOCK";
+#include "node_name.inc"
default:
rb_bug("unknown node (%d)", node);
return 0;