Skip to content

Commit

Permalink
Redo build system; bootstrapped niecza is live
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jan 14, 2011
1 parent 56c80b0 commit 923eae5
Show file tree
Hide file tree
Showing 70 changed files with 135 additions and 8,918 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ v6/STD.errors
*.mdb
*.exe
core
boot
perf/profile.txt
perf/xdb.il
.fetch-stamp
1 change: 1 addition & 0 deletions FETCH_URL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/downloads/sorear/niecza/niecza-1.5.zip
40 changes: 40 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
### CONFIGURATION

# How to run CLR programs; can be blank for Win32
RUN_CLR=mono
CSC=gmcs
RM=rm -f
CP=cp

cskernel=Kernel.cs Builtins.cs Cursor.cs JSYNC.cs NieczaCLR.cs
csbackend=CLRBackend.cs

# keep this in dependency order
units=SAFE CORE CClass Body Unit CgOp Op Sig RxOp NAME Stash JSYNC STD \
NieczaGrammar Metamodel OptRxSimple NAMOutput NieczaActions \
NieczaFrontendSTD NieczaPassBegin NieczaPassBeta NieczaPassSimplifier \
NieczaPathSearch NieczaBackendNAM NieczaBackendDotnet NieczaBackendClisp \
NieczaCompiler

all: obj/Kernel.dll obj/CLRBackend.exe .fetch-stamp
cd src && $(RUN_CLR) ../boot/run/Niecza.exe -I../lib -v -c -Bnam niecza
for nfile in $(units); do echo $$nfile; \
$(RUN_CLR) boot/obj/CLRBackend.exe boot/obj $$nfile.nam $$nfile.dll 0; \
done
$(RUN_CLR) boot/obj/CLRBackend.exe boot/obj MAIN.nam MAIN.exe 1
$(CP) $(patsubst %,boot/obj/%.dll,Kernel $(units)) run/
$(CP) boot/obj/MAIN.exe run/Niecza.exe

.fetch-stamp: FETCH_URL
-rm -rf boot/
mkdir boot
wget --no-check-certificate -Oboot/niecza.zip $$(cat FETCH_URL)
cd boot && unzip niecza.zip
touch .fetch-stamp

obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel))
$(CSC) /target:library /out:obj/Kernel.dll /unsafe+ \
$(patsubst %,lib/%,$(cskernel))
obj/CLRBackend.exe: $(patsubst %,lib/%,$(csbackend)) obj/Kernel.dll
$(CSC) /target:exe /lib:obj /out:obj/CLRBackend.exe /r:Kernel.dll \
$(patsubst %,lib/%,$(csbackend))
95 changes: 0 additions & 95 deletions Niecza.proj

This file was deleted.

19 changes: 0 additions & 19 deletions PerlStub.pl

This file was deleted.

79 changes: 0 additions & 79 deletions PerlTask.cs

This file was deleted.

54 changes: 23 additions & 31 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
New lists: (a little dated, see newlist.pl)
s/Iterator/IterationCursor/
.iterator should return a real List (maybe even a primitive something)
a List itself represents an iteration state
Lists with no iterators are treated as a fast path in a lot of cases
possibly, Lists should be limited to one iterator
$!flat is completely wrong and should die. .flat is just a map-like operator
From the v6/TODO:
These things were noticed during translation, but to fix them now would
only slow me down...

Niecza-NAM-Lorito:
NAM is a Lorito prototype! See #parrot logs
To make it real:
* 3-operand code
* Deregisterization pass infers use of CLR stack when registers have nested live ranges and are used exactly once
* Types and ops can be provided by a library binding spec; var, fetch et al come from niecza-perl6 library binding. As does the entire object model and subcall - bare NAM-Lorito probably won't have sub support.
* NAM has a wire format resembling LASM
* NAM needs to have real continuations

needlib 'foo'

const int 'a'
var str 'b'

code 'main' {
op 1, 2, 3
}

blob {
'a' = 1
'b' = 'Hello, world'
}
* sprintf, in particular, the ability to make numbers hex
* hash initialization idioms don't work
* no qw< >
* Any strificatrion/numification warnings would be useful
* no is rw on attributes and methods
* &split
* &callsame
* BUILD
* given/when
* non-$ attributes; @.foo and @<foo>
* :$.foo is broken
* eager map optimizations
* return()
* stashes should be accessed as common values
* "Action method ::($name) not implemented", also needs $<sym>
* context accelerators need to robustly handle undefined objects
* .list, item as accelerated contexts
* explicitly imprecise error reporting - lines A-B
* @PROCESS::ARGS ::= [1,2,3]; ok +[ @*ARGS ] == 3 # Bug
* Whatever-currying of prefixes my $x = ~*; say $x() # Whatever()<instance>

Other stuff
* Write a LHF file
* Write a ROADMAP
* Flesh out documentation a lot
* $*IN.slurp needs to use Console.OpenStdOutput (mike_f++)
86 changes: 0 additions & 86 deletions niecza

This file was deleted.

Loading

0 comments on commit 923eae5

Please sign in to comment.