diff --git a/ChangeLog b/ChangeLog index 15a6f6881b..4584cb39c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 10 01:57:23 2008 Tanaka Akira + + * tool/transcode-tblgen.rb (StrSet#hash): cache hash value. + (ActionMap#hash): ditto. + Wed Sep 10 01:26:01 2008 Tanaka Akira * include/ruby/encoding.h (econv_after_output): renamed from diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb index 5395460ee5..05ee5d314e 100644 --- a/tool/transcode-tblgen.rb +++ b/tool/transcode-tblgen.rb @@ -62,7 +62,8 @@ class StrSet end def hash - @pat.hash + return @hash if defined? @hash + @hash = @pat.hash end def eql?(other) @@ -196,11 +197,12 @@ class ActionMap end def hash + return @hash if defined? @hash hash = 0 @map.each {|k,v| hash ^= k.hash ^ v.hash } - hash + @hash = hash end def eql?(other)