Skip to content

Commit

Permalink
* keywords, lex.c.src, opt_insn_unif.def, opt_operand.def: moved rare…
Browse files Browse the repository at this point in the history
…ly changed

  input files for code generators into defs/ directory.

* Makefile.in (lex.c): followed keywords and lex.c.src.

* common.mk (parser.o): followed keywords.
  (INSNS): followed opt_*.def

* tools/instruction.rb: followed opt_*.def.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
yugui committed Oct 18, 2008
1 parent b7be78d commit c2091e3
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Sun Oct 19 07:25:08 2008 Yuki Sonoda (Yugui) <[email protected]>

* keywords, lex.c.src, opt_insn_unif.def, opt_operand.def: moved rarely changed
input files for code generators into defs/ directory.

* Makefile.in (lex.c): followed keywords and lex.c.src.

* common.mk (parser.o): followed keywords.
(INSNS): followed opt_*.def

* tools/instruction.rb: followed opt_*.def.

Sun Oct 19 12:28:01 2008 James Edward Gray II <[email protected]>

* test/csv/*: Renamed tc_* files to test_* to fit in within Ruby's
Expand Down
6 changes: 3 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,16 @@ $(srcdir)/configure: $(srcdir)/configure.in
# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
# * svn checkout generate a file with mtime as current time
# * XFS has a mtime with fractional part
lex.c: keywords
lex.c: defs/keywords
@\
if cmp -s $(srcdir)/lex.c.src $?; then \
if cmp -s $(srcdir)/defs/lex.c.src $?; then \
set -x; \
cp $(srcdir)/lex.c.blt $@; \
else \
set -x; \
gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
mv $@.tmp $@ && \
cp $? $(srcdir)/lex.c.src && \
cp $? $(srcdir)/defs/lex.c.src && \
cp $@ $(srcdir)/lex.c.blt; \
fi

Expand Down
4 changes: 2 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES)
parse.$(OBJEXT): {$(VPATH)}parse.c $(RUBY_H_INCLUDES) \
{$(VPATH)}node.h $(ENCODING_H_INCLUDES) $(ID_H_INCLUDES) \
{$(VPATH)}regenc.h {$(VPATH)}regex.h {$(VPATH)}util.h {$(VPATH)}lex.c \
{$(VPATH)}keywords {$(VPATH)}id.c
{$(VPATH)}defs/keywords {$(VPATH)}id.c
proc.$(OBJEXT): {$(VPATH)}proc.c {$(VPATH)}eval_intern.h \
$(RUBY_H_INCLUDES) {$(VPATH)}gc.h $(VM_CORE_H_INCLUDES) \
{$(VPATH)}debug.h
Expand Down Expand Up @@ -605,7 +605,7 @@ INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \

INSNS2VMOPT = --srcdir="$(srcdir)"

$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def
@$(RM) $(PROGRAM)
$(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tool/instruction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def initialize opts = {}

load_insns_def opts[:"insns.def"] || 'insns.def'

load_opt_operand_def opts[:"opope.def"] || 'opt_operand.def'
load_insn_unification_def opts[:"unif.def"] || 'opt_insn_unif.def'
load_opt_operand_def opts[:"opope.def"] || 'defs/opt_operand.def'
load_insn_unification_def opts[:"unif.def"] || 'defs/opt_insn_unif.def'
make_stackcaching_insns if vm_opt?('STACK_CACHING')
end

Expand Down Expand Up @@ -1326,8 +1326,8 @@ def generate args = []
def self.def_options(opt)
opts = {
:"insns.def" => 'insns.def',
:"opope.def" => 'opt_operand.def',
:"unif.def" => 'opt_insn_unif.def',
:"opope.def" => 'defs/opt_operand.def',
:"unif.def" => 'defs/opt_insn_unif.def',
}

opt.on("-Dname", /\AOPT_(\w+)\z/, "enable VM option") {|s, v|
Expand Down

0 comments on commit c2091e3

Please sign in to comment.