mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (ripper_intern): enable literal optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28d97e63d6
commit
7bf5211220
2 changed files with 4 additions and 8 deletions
|
@ -1,4 +1,6 @@
|
||||||
Tue Oct 20 15:28:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Oct 20 15:38:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (ripper_intern): enable literal optimization.
|
||||||
|
|
||||||
* parse.y (method_call): dispatch symbols. a patch from Andy Keep in
|
* parse.y (method_call): dispatch symbols. a patch from Andy Keep in
|
||||||
[ruby-core:26169]. [ruby-core:26165]
|
[ruby-core:26169]. [ruby-core:26165]
|
||||||
|
|
8
parse.y
8
parse.y
|
@ -513,7 +513,7 @@ static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,V
|
||||||
|
|
||||||
#define yyparse ripper_yyparse
|
#define yyparse ripper_yyparse
|
||||||
|
|
||||||
static VALUE ripper_intern(const char*);
|
#define ripper_intern(s) ID2SYM(rb_intern(s))
|
||||||
static VALUE ripper_id2sym(ID);
|
static VALUE ripper_id2sym(ID);
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
|
#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
|
||||||
|
@ -10179,12 +10179,6 @@ ripper_id2sym(ID id)
|
||||||
return ID2SYM(rb_intern(name));
|
return ID2SYM(rb_intern(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
|
||||||
ripper_intern(const char *s)
|
|
||||||
{
|
|
||||||
return ID2SYM(rb_intern(s));
|
|
||||||
}
|
|
||||||
|
|
||||||
static ID
|
static ID
|
||||||
ripper_get_id(VALUE v)
|
ripper_get_id(VALUE v)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue