Skip to content

Commit

Permalink
[JIT] Move JIT-compile support libs to tools/lib
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw committed Jan 13, 2019
1 parent b7984a4 commit 1975430
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
9 changes: 6 additions & 3 deletions build/Makefile.in
Expand Up @@ -80,6 +80,8 @@ JIT_INTERMEDIATES = src/jit/x64/emit.c \
src/jit/x64/tile_pattern.h \
src/jit/core_templates.h

JIT_PERL_LIBS = tools/lib/sexpr.pm tools/lib/expr_ops.pm tools/lib/oplist.pm

MAIN_OBJECTS = src/main@obj@


Expand Down Expand Up @@ -636,11 +638,12 @@ src/jit/x64/emit.c: src/jit/x64/emit.dasc src/jit/x64/tiles.dasc $(MINILUA) $(DY

# Expression list tables
src/jit/core_templates.h: src/jit/core_templates.expr src/jit/macro.expr \
tools/expr-template-compiler.pl tools/sexpr.pm tools/expr_ops.pm tools/oplist.pm \
src/core/oplist src/jit/expr_ops.h
src/core/oplist src/jit/expr_ops.h \
tools/expr-template-compiler.pl $(JIT_PERL_LIBS)

# Architecture-specific tiles
src/jit/x64/tile_pattern.h: src/jit/x64/tile_pattern.tile tools/tiler-table-generator.pl src/jit/expr_ops.h
src/jit/x64/tile_pattern.h: src/jit/x64/tile_pattern.tile src/jit/expr_ops.h \
tools/tiler-table-generator.pl $(JIT_PERL_LIBS)

src/jit/expr@obj@: src/jit/core_templates.h
src/jit/tile@obj@: src/jit/x64/tile_pattern.h
Expand Down
2 changes: 1 addition & 1 deletion tools/expr-template-compiler.pl
Expand Up @@ -9,7 +9,7 @@ package template_compiler;

# use my libs
use FindBin;
use lib $FindBin::Bin;
use lib File::Spec->catdir($FindBin::Bin, 'lib');

use sexpr;
use expr_ops;
Expand Down
2 changes: 1 addition & 1 deletion tools/jit-bisect.pl
Expand Up @@ -4,7 +4,7 @@
use Getopt::Long;
use File::Spec;
use FindBin;
use lib $FindBin::Bin;
use lib File::Spec->catdir($FindBin::Bin, 'lib');
use timeout qw(run_timeout);

sub run_with {
Expand Down
4 changes: 2 additions & 2 deletions tools/expr_ops.pm → tools/lib/expr_ops.pm
@@ -1,10 +1,10 @@
package expr_ops;
use strict;
use warnings;
use File::Spec::Functions qw(catdir updir catpath splitpath);
use File::Spec::Functions qw(catdir updir catpath splitpath);
use constant EXPR_OPS_H => do {
my ($path, $directory, $filename) = splitpath(__FILE__);
catpath($path, catdir($directory, updir(), 'src','jit'), 'expr_ops.h');
catpath($path, catdir($directory, (updir()) x 2, 'src','jit'), 'expr_ops.h');
};

sub parse_expr_ops {
Expand Down
4 changes: 2 additions & 2 deletions tools/oplist.pm → tools/lib/oplist.pm
@@ -1,11 +1,11 @@
package oplist;
use strict;
use warnings;
use Data::Dumper;
use File::Spec;
use constant OPLIST => do {
my ($path, $directory, $filename) = File::Spec->splitpath(__FILE__);
File::Spec->catpath($path, File::Spec->catdir($directory, File::Spec->updir(), qw(src core)), 'oplist');
my $ud = File::Spec->updir();
File::Spec->catpath($path, File::Spec->catdir($directory, ($ud) x 2,, qw(src core)), 'oplist');
};
# Parse MoarVM oplist file and stash it in @OPLIST and %OPLIST
sub parse_oplist {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion tools/tiler-table-generator.pl
Expand Up @@ -2,9 +2,11 @@
package tiler;
use strict;
use warnings;

use Getopt::Long;
use File::Spec;
use FindBin;
use lib $FindBin::Bin;
use lib File::Spec->catdir($FindBin::Bin, 'lib');

use sexpr;
use expr_ops;
Expand Down

0 comments on commit 1975430

Please sign in to comment.