Permalink
Browse files

moving core source into src/, cleaning up top-level directory

removing some unused files
  • Loading branch information...
1 parent 71186fc commit 8f0411a9436a60e942a37eb2a90e452ba66110f8 @JeffBezanson JeffBezanson committed Apr 11, 2011
View
105 Makefile
@@ -1,122 +1,41 @@
JULIAHOME = $(shell pwd)
include ./Make.inc
-SRCS = jltypes gf ast repl builtins module codegen interpreter alloc dlload \
- sys init task array dump $(GCSRCS)
-OBJS = $(SRCS:%=%.o)
-DOBJS = $(SRCS:%=%.do)
-EXENAME = $(NAME)
-LLTDIR = supportlib
-FLISPDIR = flisp
-LLT = $(LLTDIR)/libllt.a
-FLISP = $(FLISPDIR)/libflisp.a
-
-FLAGS = -falign-functions -Wall -Wno-strict-aliasing \
- -I$(FLISPDIR) -I$(LLTDIR) $(HFILEDIRS:%=-I%) $(LIBDIRS:%=-L%) \
- $(CONFIG) -I$(shell $(LLVMROOT)/bin/llvm-config --includedir) \
- -fvisibility=hidden
-DEBUGFLAGS = -ggdb3 -DDEBUG $(FLAGS)
-SHIPFLAGS = -O3 -DNDEBUG $(FLAGS)
-
-LIBFILES = $(FLISP) $(LLT)
-LIBS = $(LIBFILES) -L$(EXTROOT)/lib -lutil -ldl -lm -lreadline $(OSLIBS) \
- $(shell $(LLVMROOT)/bin/llvm-config --ldflags --libs engine) -lpthread
-
default: debug
-%.o: %.c julia.h
- $(CC) $(CFLAGS) $(SHIPFLAGS) -c $< -o $@
-%.do: %.c julia.h
- $(CC) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $@
-%.o: %.cpp julia.h
- $(CXX) $(CXXFLAGS) $(SHIPFLAGS) $(shell $(LLVMROOT)/bin/llvm-config --cppflags) -c $< -o $@
-%.do: %.cpp julia.h
- $(CXX) $(CXXFLAGS) $(DEBUGFLAGS) $(shell $(LLVMROOT)/bin/llvm-config --cppflags) -c $< -o $@
-
-ast.o ast.do: julia_flisp.boot.inc boot.j.inc
-julia_flisp.boot.inc: julia_flisp.boot $(FLISP)
- $(FLISPDIR)/flisp ./bin2hex.scm < $< > $@
-julia_flisp.boot: julia-parser.scm julia-syntax.scm \
- match.scm utils.scm jlfrontend.scm mk_julia_flisp_boot.scm $(FLISP)
- $(FLISPDIR)/flisp ./mk_julia_flisp_boot.scm
-
-boot.j.inc: boot.j preparse.scm julia_flisp.boot
- $(FLISPDIR)/flisp ./preparse.scm < $< | $(FLISPDIR)/flisp ./bin2hex.scm > $@
-
-codegen.o codegen.do: intrinsics.cpp
-builtins.o builtins.do: table.c
+julia-debug:
+ cd src && make debug
-julia-defs.s.bc: julia-defs$(NBITS).s
- $(LLVMROOT)/bin/llvm-as -f $< -o $@
+julia-release:
+ cd src && make release
-julia-defs.s.bc.inc: julia-defs.s.bc bin2hex.scm $(FLISP)
- $(FLISPDIR)/flisp ./bin2hex.scm < $< > $@
-
-$(LLT): $(LLTDIR)/*.h $(LLTDIR)/*.c
- cd $(LLTDIR) && $(MAKE)
+sys.ji: sysimg.j start_image.j src/boot.j src/dump.c
+ ./julia -b sysimg.j
-$(FLISP): $(FLISPDIR)/*.h $(FLISPDIR)/*.c $(LLT)
- cd $(FLISPDIR) && $(MAKE)
+custom.j:
+ if [ ! -f custom.j ]; then touch custom.j; fi
PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+
pcre_h.j:
cpp -dM $(EXTROOT)/include/pcre.h | perl -nle '/^\s*#define\s+(PCRE\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "$$1 = $$2"' | sort > $@
-julia-debug: $(DOBJS) $(LIBFILES)
- $(CXX) $(DEBUGFLAGS) $(DOBJS) -o $@ $(LIBS)
-
-julia-release: $(OBJS) $(LIBFILES)
- $(CXX) $(SHIPFLAGS) $(OBJS) -o $@ $(LIBS)
-
-sys.ji: sysimg.j start_image.j boot.j dump.c
- ./julia -b sysimg.j
-
-julia-debug-link:
- ln -f julia-debug julia
-
-julia-release-link:
- ln -f julia-release julia
-
-custom.j:
- if [ ! -f custom.j ]; then touch custom.j; fi
-
-debug release: %: julia-% julia-%-link pcre_h.j sys.ji custom.j
+debug release: %: julia-% pcre_h.j sys.ji custom.j
test: debug
./julia tests.j
testall: test
./julia test_utf8.j
-SLOCCOUNT = sloccount \
- --addlang makefile \
- --personcost 100000 \
- --effort 3.6 1.2 \
- --schedule 2.5 0.32
-
-sloccount:
- for x in *.j; do cp $$x $${x%.j}.hs; done
- $(SLOCCOUNT) . | perl -ple 's/haskell/_julia_/g'
- rm *.hs
-
clean:
- rm -f *.o
- rm -f *.do
- rm -f *.bc
- rm -f *.bc.inc
- rm -f *.jp
+ $(MAKE) -C src clean
rm -f *.ji
- rm -f julia_flisp.boot
- rm -f julia_flisp.boot.inc
- rm -f $(EXENAME)
rm -f pcre_h.j
rm -f *~ *#
cleanall: clean
rm -f nbits
- rm -rf $(EXENAME)-{debug,release}
- $(MAKE) -C $(LLTDIR) clean
- $(MAKE) -C $(FLISPDIR) clean
+ $(MAKE) -C src cleanother
-.PHONY: debug release test testall sloccount clean cleanall
+.PHONY: debug release test testall clean cleanall
View
@@ -1,30 +0,0 @@
-; -*- llvm -*-
-
-; definitions from julia.h for use by llvm code
-
-%struct._jl_type_t = type { %struct._jl_type_t* }
-%struct._jl_value_t = type { %struct._jl_type_t* }
-%jl_callable_t = type %struct._jl_value_t* (%struct._jl_value_t*, %struct._jl_value_t**, i32)
-%jl_fptr_t = type %jl_callable_t*
-%0 = type { i32, i8**, [32 x i8*] }
-%1 = type { i32, i32, i8**, [29 x i8*] }
-%2 = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_typector_t* }
-%3 = type { %struct._jl_type_t*, i32, [1 x %struct._jl_type_t*] }
-%jl_tuple_t = type { %struct._jl_type_t*, i32, [1 x %struct._jl_value_t*] }
-%jl_buffer_t = type { %struct._jl_type_t*, i32, i8* }
-%4 = type { %struct._jl_type_t*, %jl_fptr_t, %struct._jl_type_t*, %5* }
-%jl_function_t = type %4
-%5 = type { %struct._jl_type_t*, %jl_fptr_t, %struct._jl_value_t*, %jl_tuple_t* }
-%jl_lambda_info = type %5
-%6 = type { %struct._jl_type_t*, %struct._jl_type_t*, %struct._jl_type_t* }
-%7 = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3*, %4*, i32, i32 }
-%8 = type { %struct._jl_type_t*, %3* }
-%9 = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_type_t*, %struct._jl_type_t* }
-%10 = type { %struct._jl_type_t*, i32, i8* }
-%struct._jl_module_t = type { %struct._jl_sym_t*, %0, %0, %1 }
-%struct._jl_sym_t = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_sym_t*, i32, %union.anon }
-%struct._jl_tag_type_t = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3* }
-%struct._jl_typector_t = type { %struct._jl_type_t*, %3*, %struct._jl_type_t* }
-%struct._typekey_stack_t = type { %struct._jl_type_t**, i32, %struct._jl_type_t*, %struct._typekey_stack_t* }
-%struct.anon = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3*, %3*, %3*, %4*, %4*, i32 }
-%union.anon = type { i8* }
View
@@ -1,30 +0,0 @@
-; -*- llvm -*-
-
-; definitions from julia.h for use by llvm code
-
-%struct._jl_type_t = type { %struct._jl_type_t* }
-%struct._jl_value_t = type { %struct._jl_type_t* }
-%jl_callable_t = type %struct._jl_value_t* (%struct._jl_value_t*, %struct._jl_value_t**, i32)
-%jl_fptr_t = type %jl_callable_t*
-%0 = type { i64, i8**, [32 x i8*] }
-%1 = type { i64, i64, i8**, [29 x i8*] }
-%2 = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_typector_t* }
-%3 = type { %struct._jl_type_t*, i64, [1 x %struct._jl_type_t*] }
-%jl_tuple_t = type { %struct._jl_type_t*, i64, [1 x %struct._jl_value_t*] }
-%jl_buffer_t = type { %struct._jl_type_t*, i64, i8* }
-%4 = type { %struct._jl_type_t*, %jl_fptr_t, %struct._jl_type_t*, %5* }
-%jl_function_t = type %4
-%5 = type { %struct._jl_type_t*, %jl_fptr_t, %struct._jl_value_t*, %jl_tuple_t* }
-%jl_lambda_info = type %5
-%6 = type { %struct._jl_type_t*, %struct._jl_type_t*, %struct._jl_type_t* }
-%7 = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3*, %4*, i64, i64 }
-%8 = type { %struct._jl_type_t*, %3* }
-%9 = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_type_t*, %struct._jl_type_t* }
-%10 = type { %struct._jl_type_t*, i64, i8* }
-%struct._jl_module_t = type { %struct._jl_sym_t*, %0, %0, %1 }
-%struct._jl_sym_t = type { %struct._jl_type_t*, %struct._jl_sym_t*, %struct._jl_sym_t*, i64, %union.anon }
-%struct._jl_tag_type_t = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3* }
-%struct._jl_typector_t = type { %struct._jl_type_t*, %3*, %struct._jl_type_t* }
-%struct._typekey_stack_t = type { %struct._jl_type_t**, i64, %struct._jl_type_t*, %struct._typekey_stack_t* }
-%struct.anon = type { %struct._jl_type_t*, %2*, %struct._jl_tag_type_t*, %3*, %3*, %3*, %4*, %4*, i64 }
-%union.anon = type { i8* }
View
@@ -0,0 +1,94 @@
+JULIAHOME = $(shell pwd)/..
+include ../Make.inc
+
+SRCS = jltypes gf ast repl builtins module codegen interpreter alloc dlload \
+ sys init task array dump $(GCSRCS)
+OBJS = $(SRCS:%=%.o)
+DOBJS = $(SRCS:%=%.do)
+EXENAME = $(NAME)
+LLTDIR = ../supportlib
+FLISPDIR = ../flisp
+LLT = $(LLTDIR)/libllt.a
+FLISP = $(FLISPDIR)/libflisp.a
+
+FLAGS = -falign-functions -Wall -Wno-strict-aliasing \
+ -I$(FLISPDIR) -I$(LLTDIR) $(HFILEDIRS:%=-I%) $(LIBDIRS:%=-L%) \
+ $(CONFIG) -I$(shell $(LLVMROOT)/bin/llvm-config --includedir) \
+ -fvisibility=hidden
+DEBUGFLAGS = -ggdb3 -DDEBUG $(FLAGS)
+SHIPFLAGS = -O3 -DNDEBUG $(FLAGS)
+
+LIBFILES = $(FLISP) $(LLT)
+LIBS = $(LIBFILES) -L$(EXTROOT)/lib -lutil -ldl -lm -lreadline $(OSLIBS) \
+ $(shell $(LLVMROOT)/bin/llvm-config --ldflags --libs engine) -lpthread
+
+%.o: %.c julia.h
+ $(CC) $(CFLAGS) $(SHIPFLAGS) -c $< -o $@
+%.do: %.c julia.h
+ $(CC) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $@
+%.o: %.cpp julia.h
+ $(CXX) $(CXXFLAGS) $(SHIPFLAGS) $(shell $(LLVMROOT)/bin/llvm-config --cppflags) -c $< -o $@
+%.do: %.cpp julia.h
+ $(CXX) $(CXXFLAGS) $(DEBUGFLAGS) $(shell $(LLVMROOT)/bin/llvm-config --cppflags) -c $< -o $@
+
+ast.o ast.do: julia_flisp.boot.inc boot.j.inc
+julia_flisp.boot.inc: julia_flisp.boot $(FLISP)
+ $(FLISPDIR)/flisp ./bin2hex.scm < $< > $@
+julia_flisp.boot: julia-parser.scm julia-syntax.scm \
+ match.scm utils.scm jlfrontend.scm mk_julia_flisp_boot.scm $(FLISP)
+ $(FLISPDIR)/flisp ./mk_julia_flisp_boot.scm
+
+boot.j.inc: boot.j preparse.scm julia_flisp.boot
+ $(FLISPDIR)/flisp ./preparse.scm < $< | $(FLISPDIR)/flisp ./bin2hex.scm > $@
+
+codegen.o codegen.do: intrinsics.cpp
+builtins.o builtins.do: table.c
+
+$(LLT): $(LLTDIR)/*.h $(LLTDIR)/*.c
+ cd $(LLTDIR) && $(MAKE)
+
+$(FLISP): $(FLISPDIR)/*.h $(FLISPDIR)/*.c $(LLT)
+ cd $(FLISPDIR) && $(MAKE)
+
+../julia-debug: $(DOBJS) $(LIBFILES)
+ $(CXX) $(DEBUGFLAGS) $(DOBJS) -o $@ $(LIBS)
+
+../julia-release: $(OBJS) $(LIBFILES)
+ $(CXX) $(SHIPFLAGS) $(OBJS) -o $@ $(LIBS)
+
+julia-debug-link:
+ ln -sf julia-debug ../julia
+
+julia-release-link:
+ ln -sf julia-release ../julia
+
+debug release: %: ../julia-% julia-%-link
+
+SLOCCOUNT = sloccount \
+ --addlang makefile \
+ --personcost 100000 \
+ --effort 3.6 1.2 \
+ --schedule 2.5 0.32
+
+sloccount:
+ for x in *.j; do cp $$x $${x%.j}.hs; done
+ $(SLOCCOUNT) . | perl -ple 's/haskell/_julia_/g'
+ rm *.hs
+
+clean:
+ rm -f *.o
+ rm -f *.do
+ rm -f *.ji
+ rm -f julia_flisp.boot
+ rm -f julia_flisp.boot.inc
+ rm -f ../$(EXENAME)
+ rm -f *~ *#
+
+cleanother:
+ rm -rf ../$(EXENAME)-{debug,release}
+ $(MAKE) -C $(LLTDIR) clean
+ $(MAKE) -C $(FLISPDIR) clean
+
+cleanall: clean cleanother
+
+.PHONY: debug release sloccount clean cleanall cleanother
View
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -900,6 +900,7 @@ void jl_restore_system_image(char *fname)
jl_value_t *fexpr = jl_parse_file_string(ss.buf);
JL_GC_PUSH(&fexpr);
ios_close(&ss);
+ // TODO: there is no exception handler here!
jl_load_file_expr(fname, fexpr);
JL_GC_POP();
}
View
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
-(load "flisp/aliases.scm")
+(load "../flisp/aliases.scm")
(load "utils.scm")
(load "match.scm")
(load "julia-parser.scm")
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
File renamed without changes.

0 comments on commit 8f0411a

Please sign in to comment.