Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 15:09:16 -0800 (Tue, 01 Mar 2005)
Revision: 6790
Log message:
Use omake to construct the final mmc theory.
In mk/config, you now have the option to specify the
mmc extensions and backends.
For each extension, you must specify:
1. The name of the extension
2. The files
3. Any backend-specific files
See any of the extensions/*/Files for examples.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 15:09:48 -0800 (Tue, 01 Mar 2005)
Revision: 6791
Log message:
These files are now generated.
Changes | Path |
Deleted | mpcompiler/mmc/main/mmc_theory.ml |
Deleted | mpcompiler/mmc/main/mmc_theory.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 17:03:35 -0800 (Tue, 01 Mar 2005)
Revision: 6793
Log message:
Added code generation for integer arithmetic.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 19:36:59 -0800 (Tue, 01 Mar 2005)
Revision: 6794
Log message:
closure-elim now type checks.
We have a weird problem with dT. During typechecking, dT fails, but
manual application of the rules works, and autoT works.
I've changed the repeatT (dT 0) to autoT until we fix this problem.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 19:37:42 -0800 (Tue, 01 Mar 2005)
Revision: 6795
Log message:
Apparently I forgot to commit this OMakefile.
Changes | Path |
Properties | mpcompiler/mmc/main |
Added | mpcompiler/mmc/main/OMakefile |
Properties | mpcompiler/mmc/main/OMakefile |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 20:24:07 -0800 (Tue, 01 Mar 2005)
Revision: 6796
Log message:
mmc requires omake 0.9.4.1
Changes | Path |
+1 -1 | mpcompiler/mmc/OMakefile |
+1 -1 | mpcompiler/mmc/core/mmc_core_type_check.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 21:06:47 -0800 (Tue, 01 Mar 2005)
Revision: 6798
Log message:
Adding display forms to the asm.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 21:11:19 -0800 (Tue, 01 Mar 2005)
Revision: 6800
Log message:
Renamed mmc_lir_closure_elim.ml
Since we always put extension code in the extensions directory, there is no
need to have subdirectories for stages.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 21:32:58 -0800 (Tue, 01 Mar 2005)
Revision: 6801
Log message:
More progress on codegen.
Changes | Path |
+20 -3 | mpcompiler/mmc/arch/x86/base/mmc_x86_asm.ml |
+10 -3 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_codegen_core.ml |
+2 -2 | mpcompiler/mmc/extensions/tyexists/mmc_x86_tyexists.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 21:40:38 -0800 (Tue, 01 Mar 2005)
Revision: 6802
Log message:
Renamed mmc_x86_codegen_core.ml to mmc_x86_codegen.ml
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 22:47:32 -0800 (Tue, 01 Mar 2005)
Revision: 6803
Log message:
Yay! I basically have the first codegen example.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-01 22:59:53 -0800 (Tue, 01 Mar 2005)
Revision: 6804
Log message:
To simplify, I completely removed the Codegen{'e} form in favor of
only using the Codegen{'e1; v. 'e2['v]} form.
Changes | Path |
+5 -0 | mpcompiler/mmc/arch/x86/base/mmc_x86_asm.ml |
+23 -31 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_codegen.ml |
+0 -1 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_codegen.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-02 00:32:02 -0800 (Wed, 02 Mar 2005)
Revision: 6806
Log message:
Added initial assembly typechecking.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 01:52:31 -0800 (Wed, 02 Mar 2005)
Revision: 6807
Log message:
- Made sure theories/mmc/test/OMakefile is included and not just
theories/mmc/test/Files
- Added some code to clean mmc subdirectories on "omake clean".
Changes | Path |
+16 -7 | mpcompiler/mmc/OMakefile |
+1 -2 | mpcompiler/mmc/test/OMakefile |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 03:01:05 -0800 (Wed, 02 Mar 2005)
Revision: 6808
Log message:
- My previous commit broke the build system, fixing.
- Fixed the "omake mmc_tests" target.
- Fixed type inference for boolean expressions and for applications.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 03:17:58 -0800 (Wed, 02 Mar 2005)
Revision: 6809
Log message:
Fixed another type inference bug
Changes | Path |
+2 -2 | mpcompiler/mmc/core/mmc_core_type_infer.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 03:46:08 -0800 (Wed, 02 Mar 2005)
Revision: 6810
Log message:
Fixed a bug in cps
Changes | Path |
+1 -1 | mpcompiler/mmc/core/mmc_core_cps.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 03:55:13 -0800 (Wed, 02 Mar 2005)
Revision: 6811
Log message:
Added couple of missing reduce resource annotations
Changes | Path |
+2 -2 | mpcompiler/mmc/core/mmc_core_reserve.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-02 09:21:02 -0800 (Wed, 02 Mar 2005)
Revision: 6812
Log message:
Updated the OMakefile a bit.
See the comment at the top of the OMakefile for a description
of how to configure mmc.
Changes | Path |
+31 -7 | mpcompiler/mmc/OMakefile |
Deleted | mpcompiler/mmc/test/Files |
+9 -0 | mpcompiler/mmc/test/OMakefile |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-02 11:36:42 -0800 (Wed, 02 Mar 2005)
Revision: 6815
Log message:
Instead of having a special form for tuple subscripts,
add an operand MemRegOffW{'r : Register; 'i : Int} that
interprets the index 'i as being a word index.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 20:45:33 -0800 (Wed, 02 Mar 2005)
Revision: 6821
Log message:
Fixed reserveT
Changes | Path |
+9 -9 | mpcompiler/mmc/core/mmc_core_reserve.ml |
+990 -1047 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-02 21:36:58 -0800 (Wed, 02 Mar 2005)
Revision: 6822
Log message:
- Simplified the CPS a bit, removing the need for an outher repeatC.
"omake mmc_tests" still shows that CPS is buggy...
- Removed some ugly spaces from the generated mmc_theory.ml
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 08:51:00 -0800 (Thu, 03 Mar 2005)
Revision: 6825
Log message:
Changed the grammar for tuples and existentials to be more consistent
with the rest of the x86 instructions.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 10:27:25 -0800 (Thu, 03 Mar 2005)
Revision: 6826
Log message:
Added some x86 type checking rules.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 13:23:35 -0800 (Thu, 03 Mar 2005)
Revision: 6827
Log message:
Yay! mmc_int_test/test0 passes the x86 type checker.
Things to think about:
1. There is a ATyLabel{'ty} type where the elements
are *labels* of values of type 'ty. This is used to convert
a direct function to a std function.
<H> >- f : Fun#direct <J> -> ty
--------------------------------------------------------
<H> >- ImmediateCLabel{'f} : ATyLabel{Fun#std <J> -> ty}
This may-or-may-not be the right way to go.
2. The "return" instruction has type void for any operand.
It is only used in initialization. We need to decide what
to do with initialization.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 19:42:40 -0800 (Thu, 03 Mar 2005)
Revision: 6832
Log message:
Added (minor) x86 optimizations.
The simple contexts seem to be working.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 19:56:27 -0800 (Thu, 03 Mar 2005)
Revision: 6833
Log message:
Added x86 dead-instruction elimination.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-03 20:39:15 -0800 (Thu, 03 Mar 2005)
Revision: 6834
Log message:
Added the slop around function calls, which allows us to specify
the calling convention.
There is a problem with the function variables, because we don't know
the type.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-04 11:51:38 -0800 (Fri, 04 Mar 2005)
Revision: 6837
Log message:
Move all the x86 stuff for tuples and existentials into their
proper files. The x86 backend won't work without them, but
the code should still be put in the right place.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-04 17:24:52 -0800 (Fri, 04 Mar 2005)
Revision: 6839
Log message:
Some preliminary support for cross-compilation. This at least allows me to
build and link the x86 backend on PowerPC. It does not yet allow actual
cross-compilation.
Changes | Path |
+9 -0 | mpcompiler/mmc/OMakefile |
+3 -0 | mpcompiler/mmc/arch/x86/runtime/OMakefile |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-04 18:02:44 -0800 (Fri, 04 Mar 2005)
Revision: 6840
Log message:
In theory, cross compilation should work. I'll try it out once I can build mmc
again and somebody explains to me how to run it. :-)
Changes | Path |
+0 -2 | mpcompiler/mmc/OMakefile |
+4 -1 | mpcompiler/mmc/test/mmc |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-04 18:38:23 -0800 (Fri, 04 Mar 2005)
Revision: 6841
Log message:
This is a bit painful, but I added the condition-code an an explicit
binding to the instructions. The main reason is to allow instruction
reordering, which requires analysis of the instructions that modify
the condition codes.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-04 20:14:47 -0800 (Fri, 04 Mar 2005)
Revision: 6842
Log message:
Added the x86 conventions.
Note, this includes a commit to MetaPRL to handle quotation patterns.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-04 20:58:03 -0800 (Fri, 04 Mar 2005)
Revision: 6843
Log message:
Added the x86 renaming and coalescing phases.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 07:56:17 -0800 (Sat, 05 Mar 2005)
Revision: 6845
Log message:
Updated x86 renaming.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 12:00:52 -0800 (Sat, 05 Mar 2005)
Revision: 6846
Log message:
The files for register allocation now compile. Untested.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 15:49:57 -0800 (Sat, 05 Mar 2005)
Revision: 6847
Log message:
Yay! The backend is complete, and mmc_int_test/test0 compiles and
runs correctly.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 16:46:47 -0800 (Sat, 05 Mar 2005)
Revision: 6848
Log message:
mmc_int_test/test1 now compiles and executes.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 17:10:29 -0800 (Sat, 05 Mar 2005)
Revision: 6849
Log message:
mmc_int_test/test2 compiles and runs.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 18:39:57 -0800 (Sat, 05 Mar 2005)
Revision: 6850
Log message:
mmc_int_test/test_cps1 compiles and runs.
Note: I haven't done anything wrt to garbage collection yet.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-05 19:06:12 -0800 (Sat, 05 Mar 2005)
Revision: 6851
Log message:
Some minor integer optimizations.
Changes | Path |
+2 -0 | mpcompiler/mmc/core/mmc_core_ast.mli |
+2 -0 | mpcompiler/mmc/extensions/int/mmc_ext_int.mli |
+28 -0 | mpcompiler/mmc/extensions/int/mmc_x86_int.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-06 12:04:38 -0800 (Sun, 06 Mar 2005)
Revision: 6852
Log message:
Added the "typeof" operator to x86.
The current method for elimination
1. adds constraints for all the variables
2. Eliminates the typeof
3. Erase all leftover constraints
This seems like it can be generalized. Adding a "sweep"
operator that sweeps down a type environment (as we have
discussed for the core).
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-06 14:51:39 -0800 (Sun, 06 Mar 2005)
Revision: 6853
Log message:
Added the initial x86 sweeper. Next, convert closure conversion
to a sweeper phase.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-06 23:02:11 -0800 (Sun, 06 Mar 2005)
Revision: 6854
Log message:
Added an example to the usage string.
Changes | Path |
+2 -1 | mpcompiler/mmc/test/mmc |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-07 00:33:42 -0800 (Mon, 07 Mar 2005)
Revision: 6855
Log message:
A more complete sweeper for x86.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-07 11:17:16 -0800 (Mon, 07 Mar 2005)
Revision: 6856
Log message:
x86 sweeper is complete, and x86 closure conversion is implemented.
The sweeper is wonderful logically, but it is also slow.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 12:11:56 -0800 (Tue, 08 Mar 2005)
Revision: 6859
Log message:
Converted the x86 sweeper to propositional form. That is, the sweep
environment is a collection of propositions. This is probably what
we want to use for tast optimization too.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 16:05:43 -0800 (Tue, 08 Mar 2005)
Revision: 6861
Log message:
Added reserves. Have to handle spills correctly before this
works.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 17:16:02 -0800 (Tue, 08 Mar 2005)
Revision: 6862
Log message:
test_cps1 compiles with explicit allocations.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 17:16:37 -0800 (Tue, 08 Mar 2005)
Revision: 6863
Log message:
Forgot to add allocator.
Changes | Path |
Added | mpcompiler/mmc/arch/x86/codegen/mmc_x86_alloc.ml |
Properties | mpcompiler/mmc/arch/x86/codegen/mmc_x86_alloc.ml |
Added | mpcompiler/mmc/arch/x86/codegen/mmc_x86_alloc.mli |
Properties | mpcompiler/mmc/arch/x86/codegen/mmc_x86_alloc.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 18:38:03 -0800 (Tue, 08 Mar 2005)
Revision: 6864
Log message:
Defining a sweeper for the core.
This is the main infrastructure for propagating assertions.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 19:56:16 -0800 (Tue, 08 Mar 2005)
Revision: 6865
Log message:
Added the core sweeper rewrites.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 20:30:24 -0800 (Tue, 08 Mar 2005)
Revision: 6866
Log message:
Use MP_DEBUG=hide_types if you want to hide the types for mmc terms.
Changes | Path |
+6 -6 | mpcompiler/mmc/arch/x86/base/mmc_x86_asm.ml |
+5 -5 | mpcompiler/mmc/core/mmc_core_cps.ml |
+23 -5 | mpcompiler/mmc/core/mmc_core_tast.ml |
+4 -0 | mpcompiler/mmc/core/mmc_core_tast.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-08 20:32:29 -0800 (Tue, 08 Mar 2005)
Revision: 6867
Log message:
Oops, be a bit more aggresive about type hiding.
Changes | Path |
+1 -1 | mpcompiler/mmc/core/mmc_core_tast.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 09:19:13 -0800 (Wed, 09 Mar 2005)
Revision: 6869
Log message:
Convert "std" lambdas to "rec" lambdas during type inference.
I'm not sure exactly the difference between "rec" and "std",
but let's work with it for now.
Also, I renamed Sequent.explode_sequent to Sequent.explode_sequent_arg
to avoid the shadowing hassle with TermMan.explode_sequent.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 10:26:23 -0800 (Wed, 09 Mar 2005)
Revision: 6870
Log message:
This is an intermediate commit.
The "rec" tag raises problems:
1. Type inference is more complicated.
2. Type inference is broken (all applications are
currently inferred as "std").
Fixing the second problem would require a big effort since we
need unification on tokens.
The real question is, do we really need the "rec" type? It
doesn't seem like closure conversion really it, and I don't think
it is needed anywhere else.
Changes | Path |
+0 -6 | mpcompiler/mmc/core/mmc_core_type_check.ml |
+42 -24 | mpcompiler/mmc/core/mmc_core_type_infer.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 11:08:06 -0800 (Wed, 09 Mar 2005)
Revision: 6871
Log message:
Removed the "rec" tag.
Aha! I figured out the reason why we wanted it. The issue is
that, in closure conversion, the rule for anonymous lambdas is
selected before the rule for recursive functions.
Both transformations are correct, so it is just the closure
conversion tactic that needs fixing.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 14:26:00 -0800 (Wed, 09 Mar 2005)
Revision: 6872
Log message:
Re-added the "rec" function tag.
Now we are stuck in hoisting.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 14:42:03 -0800 (Wed, 09 Mar 2005)
Revision: 6873
Log message:
Fixed hoisting. Note: I should fix the mmc_base_hoist module so it provides the
two arguments, instead of a bind term.
Now we are stuck in closure elimination. We might consider eliminating
the rec tag right after closure conversion, rather than propagating it
all the way to the backend.
Changes | Path |
+6 -0 | mpcompiler/mmc/core/mmc_core_hoist.ml |
+2 -1 | mpcompiler/mmc/test/mmc |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-09 21:19:03 -0800 (Wed, 09 Mar 2005)
Revision: 6876
Log message:
Added lazy computation of grammars (this is bug #411). This should
reduce compile times in mmc significantly.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-10 10:24:46 -0800 (Thu, 10 Mar 2005)
Revision: 6877
Log message:
Quantify lambdas in type inference.
In general, we should move to OCaml-style value polymorphism,
rather than let-polymorphism.
That means, for example, that lambdas are quantified even if they
are not in a let. Also, values like [] are quantified.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-10 10:44:57 -0800 (Thu, 10 Mar 2005)
Revision: 6878
Log message:
Handle polymorphic values through closure elimination.
Changes | Path |
+8 -13 | mpcompiler/mmc/core/mmc_core_closure.ml |
+5 -2 | mpcompiler/mmc/core/mmc_core_cps.ml |
+13 -3 | mpcompiler/mmc/core/mmc_core_hoist.ml |
+2 -24 | mpcompiler/mmc/lir/mmc_lir_closure_elim.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-10 12:41:03 -0800 (Thu, 10 Mar 2005)
Revision: 6879
Log message:
Working on polymorphic closure elimination.
I _think_, just like fun#std should be enclosed in a Lam,
that Fun#std should be enclosed in an "all". This also
changed cps slightly.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-10 22:24:56 -0800 (Thu, 10 Mar 2005)
Revision: 6895
Log message:
Fixed a painful bug in the parser where precedences were not
being translated correctly during a grammar merge.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 00:35:56 -0800 (Fri, 11 Mar 2005)
Revision: 6898
Log message:
Added the rule for closure conversion of anonymouns functions.
I have to add a type substitution operator to finish it.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 10:12:11 -0800 (Fri, 11 Mar 2005)
Revision: 6901
Log message:
Fixed closure for anonymous functions.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 13:55:37 -0800 (Fri, 11 Mar 2005)
Revision: 6902
Log message:
Added the main rule for closing recursive functions.
Changes | Path |
+22 -10 | mpcompiler/mmc/core/mmc_core_closure.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-11 15:45:32 -0800 (Fri, 11 Mar 2005)
Revision: 6904
Log message:
A comment desciring an alternative way to do closure.
Changes | Path |
+34 -0 | mpcompiler/mmc/core/mmc_core_closure.ml |
+734 -398 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 17:09:07 -0800 (Fri, 11 Mar 2005)
Revision: 6906
Log message:
Added the new closure conversion method based on what we discussed
today. Its cool, closure conversion in 3 rules.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 19:36:39 -0800 (Fri, 11 Mar 2005)
Revision: 6908
Log message:
I'm being a little anal here. I prefer the form where the <singleton_params_c>
is a context, containing singleton types. This gets the arity of the functions
right, and I feel a little better about it just because I have a better
understanding of the semantics.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-11 20:46:41 -0800 (Fri, 11 Mar 2005)
Revision: 6909
Log message:
A first swipe at enforcing the value restriction. It's probably not correct.
I'll look at it again on Monday.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 20:51:36 -0800 (Fri, 11 Mar 2005)
Revision: 6910
Log message:
Added initial tactic code for closure conversion.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 22:39:53 -0800 (Fri, 11 Mar 2005)
Revision: 6911
Log message:
NOTE: this breaks binary compatibility, bleh.
Added much better error messages to the parser, as Aleksey and I
discussed.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-11 22:47:43 -0800 (Fri, 11 Mar 2005)
Revision: 6912
Log message:
Added the tactic for closure conversion. Not debugged.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-12 00:23:48 -0800 (Sat, 12 Mar 2005)
Revision: 6913
Log message:
mmc_int_test/test1 passes closure conversion.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-12 00:47:42 -0800 (Sat, 12 Mar 2005)
Revision: 6914
Log message:
Initial closure conversion of anonymous functions.
Changes | Path |
+5 -4 | mpcompiler/mmc/core/mmc_core_closure.ml |
+4 -1 | mpcompiler/mmc/core/mmc_core_sweep.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-12 11:25:50 -0800 (Sat, 12 Mar 2005)
Revision: 6915
Log message:
Added non-binding contexts (bug #417).
mmc_int_test/test1 now passes closure conversion.
Changes | Path |
+59 -23 | metaprl/refiner/term_gen/term_meta_gen.ml |
+12 -1 | mpcompiler/mmc/core/mmc_core_closure.ml |
+6 -2 | mpcompiler/mmc/core/mmc_core_tast.ml |
+13 -4 | mpcompiler/mmc/core/mmc_core_tast.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-12 12:47:14 -0800 (Sat, 12 Mar 2005)
Revision: 6916
Log message:
Added grammar for IsValue. Note, we should try to avoid the use of
raw term syntax wherever we can. If you need instructions on how to
extend the grammar, let me know.
mmc_int_test/test_cps1 passes hoisting.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-13 20:50:15 -0800 (Sun, 13 Mar 2005)
Revision: 6917
Log message:
A lot of changes:
1. Added a typeof operator, to be used during sweeping.
2. Closure elimination is a sweep phase, but not correct
yet because we need to convert it to positive form.
We need to add IsValue rules for the closure pairs...
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-14 13:03:00 -0800 (Mon, 14 Mar 2005)
Revision: 6918
Log message:
Separated grammar files from the rest. This is cleaner, and it
reduces the cost of compiling grammar files.
Note, the way I have done it, there is a single file Mmc_core_grammar
that includes all the grammars for the core. Each non-grammar file
in the core extends Mmc_core_grammar, so there is a single shared
namespace.
The filter is still slow.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-14 20:26:25 -0800 (Mon, 14 Mar 2005)
Revision: 6924
Log message:
Converted closure conversion to the new tuple form.
This adds a bit more code the closure conversion because we
have to duplicate some of the code for tuples. However, closure
elimination becomes nearly trivial, since it just says that
closure tuples are real tuples.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-14 20:40:56 -0800 (Mon, 14 Mar 2005)
Revision: 6925
Log message:
Removed the type from tuples. It was never used and it was annoying.
Changes | Path |
+27 -34 | mpcompiler/mmc/extensions/tuple/mmc_ext_tuple.ml |
+4 -5 | mpcompiler/mmc/extensions/tuple/mmc_ext_tuple_grammar.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-14 21:17:50 -0800 (Mon, 14 Mar 2005)
Revision: 6927
Log message:
This is just the first part of closure elimination, where we
interpret closure tuples as real tuples.
The next part is existentials.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-15 02:34:36 -0800 (Tue, 15 Mar 2005)
Revision: 6930
Log message:
Be more clean on "omake clean"
Changes | Path |
+4 -0 | mpcompiler/mmc/main/OMakefile |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 09:14:40 -0800 (Tue, 15 Mar 2005)
Revision: 6931
Log message:
Added back the code for closure elimination.
Added an "eta" term in Mmc_core_util to get the function parameters
as an argument list.
Temporarily removed the IsValue check in the type checker until
Nathan fixes it. With this disabled, mmc_int_test/test_cps1 now
passes closure elimination.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 09:37:23 -0800 (Tue, 15 Mar 2005)
Revision: 6932
Log message:
Preparing for direct-call optimization.
Changes | Path |
+11 -0 | mpcompiler/mmc/lir/mmc_lir_closure_elim.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 12:16:27 -0800 (Tue, 15 Mar 2005)
Revision: 6933
Log message:
Moved Mmc_core_{inline,value} to the opt/ directory, and cleaned them up.
Note, you should remove the lingering .cm* files after you do a CVS update.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 14:12:38 -0800 (Tue, 15 Mar 2005)
Revision: 6934
Log message:
Added direct-call optimization. Currently, direct-call optimization
is just a selective inlining stage, where closure are inlined into all
places where they are used as functions. Closure elimination then has
an optimization rule that handles this optimization.
mmc_int_test/test_cps1 passes.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 14:34:23 -0800 (Tue, 15 Mar 2005)
Revision: 6935
Log message:
Closure conversion needs to put the spread inside the inner lambda.
mmc_int_test/test_cps2 is complete through closure elimination.
Changes | Path |
+29 -8 | mpcompiler/mmc/core/mmc_core_closure.ml |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-15 14:35:41 -0800 (Tue, 15 Mar 2005)
Revision: 6936
Log message:
Fixing a few .cvsignore annoyances
Changes | Path |
Properties | mpcompiler/mmc |
Properties | mpcompiler/mmc/opt/dead |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 16:40:56 -0800 (Tue, 15 Mar 2005)
Revision: 6938
Log message:
mmc_int_test/test1 passes code generation.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-15 20:00:15 -0800 (Tue, 15 Mar 2005)
Revision: 6939
Log message:
Finished the value judgment except for the existential extension. It doesn't
use the parser at the moment. I can fix that tomorrow once I've asked some
questions. Everything seems to work for the test cases I've tried, but that's
no guarantee, of course. ;^)
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 20:09:45 -0800 (Tue, 15 Mar 2005)
Revision: 6940
Log message:
Updated x86 closure conversion. I haven't tried it on any big examples,
I'm still pushing polymorphism through the backend.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 20:19:57 -0800 (Tue, 15 Mar 2005)
Revision: 6941
Log message:
mmc_int_test/test1 makes it all the way through the backend.
Changes | Path |
+6 -0 | mpcompiler/mmc/arch/x86/print/mmc_x86_print.ml |
+19 -14 | mpcompiler/mmc/arch/x86/regalloc/mmc_x86_backend.ml |
+19 -14 | mpcompiler/mmc/arch/x86/regalloc/mmc_x86_rename.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-15 21:19:50 -0800 (Tue, 15 Mar 2005)
Revision: 6942
Log message:
mmc_int_test/test_cps1 makes it part way through the backend.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-16 13:25:57 -0800 (Wed, 16 Mar 2005)
Revision: 6945
Log message:
This adds the basic framework for lifting lambdas.
I *think* that, to work properly, codegen needs to
know the type of items it is expecting...
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-16 14:34:30 -0800 (Wed, 16 Mar 2005)
Revision: 6946
Log message:
Finished the value judgment. You guys might want to check out the WithUniv and
WithTySubst terms in mmc_core_type_check_grammar.mli -- I think they might be
useful in some other contexts as well.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-16 14:57:39 -0800 (Wed, 16 Mar 2005)
Revision: 6947
Log message:
Correcting a problem in value_with_univ_cons. Unfortunately, this makes it
slower... Maybe there's a better way.
Changes | Path |
+8 -3 | mpcompiler/mmc/core/mmc_core_type_check.ml |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-16 16:13:56 -0800 (Wed, 16 Mar 2005)
Revision: 6951
Log message:
Verify that the bound in a TyLambda are well-formed.
Changes | Path |
+1 -0 | mpcompiler/mmc/core/mmc_core_type_check.ml |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-16 16:55:37 -0800 (Wed, 16 Mar 2005)
Revision: 6953
Log message:
Improved display form for IsValue. Also added another test.
Changes | Path |
+0 -0 | mpcompiler/mmc/core/mmc_core_type_check.ml |
+9 -6 | mpcompiler/mmc/core/mmc_core_type_check_grammar.ml |
+7 -0 | mpcompiler/mmc/test/mmc_int_test.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-16 17:00:24 -0800 (Wed, 16 Mar 2005)
Revision: 6954
Log message:
Codegen should state the type of the expression for which
it is generating code.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-16 17:02:51 -0800 (Wed, 16 Mar 2005)
Revision: 6956
Log message:
Ignore even more stuff.
Changes | Path |
Properties | mpcompiler/mmc/opt/dead |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-17 12:55:03 -0800 (Thu, 17 Mar 2005)
Revision: 6961
Log message:
Added the ability to use quotations to specify meta_terms.
mmc_int_test/test1 now passes code generation.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-17 17:01:49 -0800 (Thu, 17 Mar 2005)
Revision: 6965
Log message:
Added meta_term grammar to the mmc core.
Removed the need for the backquote (`)
before a meta_term in a rule.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-17 17:02:55 -0800 (Thu, 17 Mar 2005)
Revision: 6966
Log message:
Forgot to add the grammar for the x86 utilities (like subst).
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-17 20:59:57 -0800 (Thu, 17 Mar 2005)
Revision: 6968
Log message:
Some updates to CPS. Preparing to remove polymorphism introduced earlier.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-17 23:16:31 -0800 (Thu, 17 Mar 2005)
Revision: 6970
Log message:
Note to self: remember, ML-style values are *never* polymorphic unless
they are toplevel, except for existentials around closures.
Like, duh.
This solves the problem with non-toplevel Lam terms in the backend.
I added a fix to CPS to place the quantifiers appropriately in
non-tailcall applications. The tailcall version needs to be fixed.
Note also that we will need a top-level let for polymorphic constructors.
These values should be hoisted, and will prevent merging the toplevel
let-rec (no big deal).
let f x = x
let u = ([], f)
let v = (snd u) 1
let w = (snd u) "foo"
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-18 10:28:02 -0800 (Fri, 18 Mar 2005)
Revision: 6972
Log message:
mmc_int_test/test_cps1 passes x86 closure conversion.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-18 10:59:45 -0800 (Fri, 18 Mar 2005)
Revision: 6973
Log message:
mmc_int_test/test1 compiles and runs.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-18 13:32:06 -0800 (Fri, 18 Mar 2005)
Revision: 6974
Log message:
Removed the double quantifier during closure elimination.
Changes | Path |
+2 -2 | mpcompiler/mmc/core/mmc_core_cps.ml |
+2 -2 | mpcompiler/mmc/core/mmc_core_type_check.ml |
+64 -13 | mpcompiler/mmc/lir/mmc_lir_closure_elim.ml |
+1 -1 | mpcompiler/mmc/test/mmc |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-18 13:33:10 -0800 (Fri, 18 Mar 2005)
Revision: 6975
Log message:
Oops, add back direct-call optimization.
Changes | Path |
+1 -1 | mpcompiler/mmc/test/mmc |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-18 17:48:09 -0800 (Fri, 18 Mar 2005)
Revision: 6976
Log message:
Some minor performance improvements for parsing.
Changes | Path |
+5 -6 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_closure.ml |
+3 -4 | mpcompiler/mmc/extensions/tuple/mmc_x86_tuple.ml |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-18 18:47:34 -0800 (Fri, 18 Mar 2005)
Revision: 6978
Log message:
Prettified most of mmc_core_type_check.ml. The remaining ugly rules are ugly
because they use private terms that don't have support in the parser yet. At
some point we'll set them up.
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-18 18:49:40 -0800 (Fri, 18 Mar 2005)
Revision: 6979
Log message:
There's a reduction I added that should probably cause a reduce/reduce conflict,
but doesn't. I've marked it with BUG, along with the rule that relies on having
something like that production working.
Changes | Path |
+1 -1 | mpcompiler/mmc/core/mmc_core_type_check.ml |
+1 -1 | mpcompiler/mmc/core/mmc_core_type_check_grammar.mli |
Changes by: Nathaniel Gray (n8gray at caltech.edu)
Date: 2005-03-21 16:21:55 -0800 (Mon, 21 Mar 2005)
Revision: 6991
Log message:
oops! I wrote a meta-let instead of a let for the let_intro rule.
Changes | Path |
+3 -3 | mpcompiler/mmc/core/mmc_core_type_check.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 10:12:24 -0800 (Tue, 22 Mar 2005)
Revision: 6998
Log message:
- In type inference, if any free variables are generated, replace them with
TyTop. This is a HACK, of course, but this is less of a hack then what we
had before (actually allowing free FO variables in type positions and
considering them to be "implicitly quantified" types). At some point we need
to figure out what exactly such free variables mean.
After this change /mmc_core_test/test_prog1 passes the closeure stage (and
fails in x86codegenC with
"progress: codegen type(Mmc_x86_codegen!CodegenTypeVar{!ty_p1011})" )
- Since MMC does not have any real I/O yet, updated the x86_runtime to print
the value returned from the main function instead of just using it as an
exit code int.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 10:20:54 -0800 (Tue, 22 Mar 2005)
Revision: 6999
Log message:
Removing mmc_core_test.prla, as it only adds junk to mmc_tests output.
Changes | Path |
+1 -1 | mpcompiler/mmc/test/OMakefile |
Deleted | mpcompiler/mmc/test/mmc_core_test.prla |
+10 -712 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 12:11:26 -0800 (Tue, 22 Mar 2005)
Revision: 7000
Log message:
Fixed a bug in CPS - TyCPS {TyFun...} only applied TyCPS to the return type,
but not to parameters type.
I am sure Jason would be verry "happy" to see me use a nice little helper
operator with a type
declare sequent [TySeqCPS{'arg: ty_sequent{ty_hyp{'a; TyExp}; TyExp; TyExp}}] { 'a : TyExp >- TyExp } : TySeqCPSBody{'a}
;-) But in any case it is very cool that the type inference handles this
correctly.
Changes | Path |
+8 -8 | mpcompiler/mmc/core/mmc_core_cps.ml |
+3 -1 | mpcompiler/mmc/core/mmc_core_cps_private.mli |
+1 -0 | mpcompiler/mmc/test/mmc |
+7 -21 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 13:12:11 -0800 (Tue, 22 Mar 2005)
Revision: 7001
Log message:
*Important*: when using xbinder{!v} hack, you do have to faithfully consider
"v" to be a binding. In particular, this means that _all_ SO variables may
need to take the !v as an argument - even when you are not intending to
substitute anything for it!
Note: the "no-op" substitutions would notmally be dropped, so ther do not cost
much. On the other hand, an occurs check could be a bit expensive (aspecially
for a long context), so from the preformance POV it does not hurt to include
[!v] even in contexts that would not normally contain it.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-22 15:21:08 -0800 (Tue, 22 Mar 2005)
Revision: 7003
Log message:
Fixed lookahead propagation, and added empty productions.
The grammars in mmc now parse. The maximum compile time has increased
from 0.3 sec to 0.45, but I have a few minor optimizations left.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-22 15:23:04 -0800 (Tue, 22 Mar 2005)
Revision: 7004
Log message:
Ignore some more files.
Changes | Path |
Properties | mpcompiler/mmc/test |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 17:09:22 -0800 (Tue, 22 Mar 2005)
Revision: 7005
Log message:
Added couple of extra IsValue rules - for AddrOfFun and AtomTyApply.
Changes | Path |
+9 -0 | mpcompiler/mmc/core/mmc_core_type_check.ml |
+4 -84 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 17:45:28 -0800 (Tue, 22 Mar 2005)
Revision: 7006
Log message:
The type checking rule for x86main for some reason required its argument to be
in "all (). all (). ..." while in fact it always was a member of just "all ()
..."; fixed.
Changes | Path |
+1 -1 | mpcompiler/mmc/arch/x86/type/mmc_x86_type_check.ml |
+115 -31 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 18:32:02 -0800 (Tue, 22 Mar 2005)
Revision: 7007
Log message:
Modified the mmc script and tests/OMakefile so that
- it is possible to run the mmc tests in parallel
- it is possible to specify assembly output file other than editor/ml/asm.s
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 19:31:17 -0800 (Tue, 22 Mar 2005)
Revision: 7008
Log message:
This was pretty hard one to find out!
Turned out that we had two different TailCPS operators - one was defined in
mmc_core_cps.ml and one was declared in mmc_core_cps_grammar.mli!
I rolled the CPS grammars from separate
mmc_core_cps_grammar/mmc_core_cps_private back into single mmc_core_cps
module.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-22 22:05:48 -0800 (Tue, 22 Mar 2005)
Revision: 7010
Log message:
Missing dependency
Changes | Path |
+1 -1 | mpcompiler/mmc/test/OMakefile |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-23 09:41:04 -0800 (Wed, 23 Mar 2005)
Revision: 7012
Log message:
Added an "XXX BUG" - a number of sweep-related rules are only semanticly valid
in one direction.
Changes | Path |
+1 -0 | mpcompiler/mmc/core/mmc_core_sweep.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-23 10:03:22 -0800 (Wed, 23 Mar 2005)
Revision: 7014
Log message:
Don't need to include the *_grammar file.
Changes | Path |
+0 -1 | mpcompiler/mmc/core/mmc_core_cps.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-23 11:52:58 -0800 (Wed, 23 Mar 2005)
Revision: 7015
Log message:
Merged the _grammar files back into their original places.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-23 12:11:56 -0800 (Wed, 23 Mar 2005)
Revision: 7016
Log message:
Added some comments to CPS.
Changes | Path |
+20 -0 | mpcompiler/mmc/core/mmc_core_cps.ml |
+6 -0 | mpcompiler/mmc/core/mmc_core_cps.mli |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-23 12:26:45 -0800 (Wed, 23 Mar 2005)
Revision: 7017
Log message:
Before I change anything, I want to commit the current state of things.
Curiusly, Jason's latest changes got rid of
"x86codegenC progress: codegen type(Mmc_x86_codegen!CodegenTypeVar{!ty_y1012})"
errors, replacing them with typechecking errors after codegen...
Changes | Path |
+595 -22 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-23 12:51:54 -0800 (Wed, 23 Mar 2005)
Revision: 7018
Log message:
No-op: moved the "multi-let" forms into the sweep module.
Changes | Path |
+43 -0 | mpcompiler/mmc/core/mmc_core_sweep.ml |
+127 -0 | mpcompiler/mmc/core/mmc_core_sweep.mli |
+0 -91 | mpcompiler/mmc/core/mmc_core_tast.ml |
+0 -124 | mpcompiler/mmc/core/mmc_core_tast.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-23 13:46:38 -0800 (Wed, 23 Mar 2005)
Revision: 7019
Log message:
Minor changes in x86 closure conversion.
mmc_int_test/test_cps1 now compiles and works.
mmc_int_test/test_cps2 compiles, but seg-faults...
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-23 18:46:51 -0800 (Wed, 23 Mar 2005)
Revision: 7022
Log message:
mmc_int_test/test_cps2 runs. It never terminates, but that is expected,
and it shows the garbage collector works.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-23 21:58:46 -0800 (Wed, 23 Mar 2005)
Revision: 7023
Log message:
Finished an exersise in making the type for the sweep operator more precise.
(The bulk of it was pretty simple, but getting the details right ended up
somewhat tricky).
Couple of hightlights:
- The Mmc_core_sweep.sweep_add_start rewrite now typechecks without any bogus
"helper" argument (which was the initial motivation for this change).
- I've hacked "proper" polymorphism for the sweeper as well. For example,
the "sweeping is always legal" in Mmc_lir_closure_elim is now stated simply
as:
prim_rw sweep_exp {| sweep |} :
<:tast< sweep#elim <env> -> poly e >>
<-->
<:tast< sweepdn#elim <env> -> poly e >>
instead of separate rewrites for "exp e" and "type e".
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 03:33:44 -0800 (Thu, 24 Mar 2005)
Revision: 7025
Log message:
The sweep_add_let_*_1 rewrites no longer need a "type-enforcing" argument.
Changes | Path |
+13 -22 | mpcompiler/mmc/core/mmc_core_sweep.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 05:44:00 -0800 (Thu, 24 Mar 2005)
Revision: 7027
Log message:
A number of changes to the closure/sweeper:
1) The "let type" now has the form
let type <ty_params_c> as <bound_ty_params_c> : <singleton_ty_params_c> = <ty_args_c> in rest
where the new "<bound_ty_params_c> :" is the ty_args{| |} of the variables
bound by ty_params_c.
2) I attempted to use the <bound_ty_params_c> in the closure (as we've
discussed in the "Problems with close_letrec_phase1" thread). Surprisingly, it
didn't affect any test results. I still puzzled by this.
3) When closing for variable v:ty, one needs to close for the free variables
of ty as well!
4) Optimizations:
- when looking for variable indeces, scan the hyps _once_, build a table
and use the table for lookup.
- first create "let exp" without any "let type" in the picture, then create
the "let type".
Jason, please take a look. If you think I got it right, then you'd probably
want to replicate the changes to the x86.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 06:19:01 -0800 (Thu, 24 Mar 2005)
Revision: 7028
Log message:
More consistent usage of the check_stuckC.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 07:02:14 -0800 (Thu, 24 Mar 2005)
Revision: 7029
Log message:
Fixed codegen of TyLambda.
Changes | Path |
+15 -8 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_codegen.ml |
+492 -367 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 07:08:46 -0800 (Thu, 24 Mar 2005)
Revision: 7030
Log message:
For now - allow x86main to return arbitrary values, not just ints.
Changes | Path |
+6 -0 | mpcompiler/mmc/arch/x86/type/mmc_x86_type_check.ml |
+91 -28 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 07:26:14 -0800 (Thu, 24 Mar 2005)
Revision: 7031
Log message:
Added sweeper rewrites for "sweepdn ... inst reserve ...".
3 tests now run correctly:
- /mmc/mmc_int_test/test1
- /mmc/mmc_int_test/test2
- /mmc/mmc_int_test/test_cps1
1 test runs, but segfaults:
- /mmc_int_test/test_cps2
Changes | Path |
+16 -6 | mpcompiler/mmc/arch/x86/type/mmc_x86_sweep.ml |
+278 -238 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 07:44:28 -0800 (Thu, 24 Mar 2005)
Revision: 7032
Log message:
The Mmc_x86_rename was creating loops in the rename table, which caused the
lookup to run out of stack and core dump. I've added a HACk to prevent loops
and now two more programs run (and coredump, but this is still better than
crashing MetaPRL):
- /mmc_core_test/test_prog1
- /mmc_core_test/test_prog2
Changes | Path |
+10 -1 | mpcompiler/mmc/arch/x86/regalloc/mmc_x86_rename.ml |
+377 -2 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 08:47:36 -0800 (Thu, 24 Mar 2005)
Revision: 7033
Log message:
Fixing a nasty bug in Term_ds - substitution for "v" in
sequent{...; v: t[v]; ... >- ...}
left t[v] unchnaged!
This fixes the misterious closeT bug...
Changes | Path |
+1 -1 | metaprl/refiner/term_ds/term_base_ds.ml |
+6 -13 | mpcompiler/mmc/core/mmc_core_sweep.ml |
+116 -18 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 09:06:41 -0800 (Thu, 24 Mar 2005)
Revision: 7034
Log message:
Added sweeper rewrites to the boolean extension.
Changes | Path |
+24 -0 | mpcompiler/mmc/extensions/bool/mmc_ext_bool.ml |
+4 -0 | mpcompiler/mmc/extensions/bool/mmc_ext_bool.mli |
+78 -130 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 09:20:10 -0800 (Thu, 24 Mar 2005)
Revision: 7035
Log message:
Implemented sweep and code generation for the Booleans.
mmc_int_test/test_fact1 compiles and runs, but it
produces the square of the factorial. Interesting.
I actually started this commit last night, but it aborted
after I went to sleep, because of the white-space issue,
and then I think Aleksey committed similar work:(
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 09:41:24 -0800 (Thu, 24 Mar 2005)
Revision: 7036
Log message:
test_fact1 now produces the correct answer.
Changes | Path |
+1 -1 | mpcompiler/mmc/extensions/bool/mmc_x86_bool.ml |
+1 -1 | mpcompiler/mmc/extensions/int/mmc_x86_int.ml |
+1 -1 | mpcompiler/mmc/test/mmc_int_test.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-24 09:45:22 -0800 (Thu, 24 Mar 2005)
Revision: 7037
Log message:
Updating tests state after Jason's commit.
Changes | Path |
+182 -73 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 11:38:58 -0800 (Thu, 24 Mar 2005)
Revision: 7038
Log message:
Mmc_ext_integer duplicated the sweep rules in Mmc_ext_arithmetic.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 12:35:37 -0800 (Thu, 24 Mar 2005)
Revision: 7039
Log message:
Prettefied CPS except for Aleksey's funky term.
Changes | Path |
+122 -74 | mpcompiler/mmc/core/mmc_core_cps.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 12:48:14 -0800 (Thu, 24 Mar 2005)
Revision: 7040
Log message:
Forgot to prettify the rules.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 13:13:04 -0800 (Thu, 24 Mar 2005)
Revision: 7041
Log message:
Eta-expand the continuations in CPS conversion of conditionals.
Changes | Path |
+19 -18 | mpcompiler/mmc/core/mmc_core_cps.ml |
+9 -7 | mpcompiler/mmc/extensions/bool/mmc_ext_bool.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 16:41:34 -0800 (Thu, 24 Mar 2005)
Revision: 7042
Log message:
Returning TailCPS to ugly form.
Changes | Path |
+33 -37 | mpcompiler/mmc/core/mmc_core_cps.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 18:53:55 -0800 (Thu, 24 Mar 2005)
Revision: 7043
Log message:
Add explicit lets for type applications introduced by CPS conversion.
At the same time, be more aggresive about inlining in direct-call
optimization, so these type applications can be inlined.
mmc_int_test/test_fact2 now works.
mmc_int_test/test_fact3 fails, because (finally) we have to spill,
and the spiller hasn't been tested.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-24 20:57:15 -0800 (Thu, 24 Mar 2005)
Revision: 7045
Log message:
First steps on spilling.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-25 13:08:48 -0800 (Fri, 25 Mar 2005)
Revision: 7046
Log message:
Normal spilling is pretty much working, although I have to figure out
a type error after register allocation. I need to head in for Cristian's
journal club.
This does not include spilling of parameters, just intra-procedural
spilling.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-25 18:00:35 -0800 (Fri, 25 Mar 2005)
Revision: 7047
Log message:
- Updated the mmc script to accomodate the case of mailformed assembly
rejected by GCC (the current version of MMC creates invalid registers).
- Added mcc_spill_test tests to the tests list.
- Updated the current mmc_tests_out.previous to match the current state of
affairs.
Changes | Path |
+3 -0 | mpcompiler/mmc/test/OMakefile |
+11 -5 | mpcompiler/mmc/test/mmc |
+756 -1145 | mpcompiler/mmc/test/mmc_tests_out.previous |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2005-03-25 18:17:22 -0800 (Fri, 25 Mar 2005)
Revision: 7048
Log message:
Added full fallback capability to the MMC table-based rewriting.
Changes | Path |
+15 -15 | mpcompiler/util/mm_tactic_util.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-26 11:21:55 -0800 (Sat, 26 Mar 2005)
Revision: 7049
Log message:
Converted to resource-based progress check.
Changes | Path |
+3 -14 | mpcompiler/mmc/arch/x86/type/mmc_x86_sweep.ml |
+6 -14 | mpcompiler/mmc/core/mmc_core_sweep.ml |
+6 -0 | mpcompiler/util/mm_tactic_util.ml |
+1 -0 | mpcompiler/util/mm_tactic_util.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-26 11:47:42 -0800 (Sat, 26 Mar 2005)
Revision: 7050
Log message:
Fixed a typo that was causing the type error after spilling.
Changes | Path |
+1 -1 | mpcompiler/mmc/arch/x86/type/mmc_x86_type_check_core.ml |
+20 -20 | mpcompiler/mmc/extensions/tuple/mmc_x86_tuple.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-26 15:49:54 -0800 (Sat, 26 Mar 2005)
Revision: 7052
Log message:
In Filter_patt, interpret the variable "_" as representing
a wildcard pattern.
Starting work on spill assignment.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-26 17:09:28 -0800 (Sat, 26 Mar 2005)
Revision: 7053
Log message:
Oops, the _ variable gets turned into an empty variable. I'm not sure
if we should fix Lm_symbol, but in any case, I've updated Filter_patt
to consider "" to denote a wildcard pattern.
Also, when we use simple wildcards, the syntax become unreadable
(at least to me). OCaml plans to treat variables that begin with an
underscore as real variables, but with special meaning wrt dead code.
In fact, it may already do this.
To handle these issues, Filter_patt now considers the following veriables
to denote wildcards:
1. the empty string,
2. a single underscore,
3. a double underscore followed by anything.
Changes | Path |
+10 -6 | metaprl/filter/filter/filter_patt.ml |
+64 -6 | mpcompiler/mmc/arch/x86/regalloc/mmc_x86_backend.ml |
+9 -0 | mpcompiler/mmc/extensions/tyexists/mmc_x86_tyexists.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-26 19:09:29 -0800 (Sat, 26 Mar 2005)
Revision: 7054
Log message:
Assign exact spill locations.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 09:16:49 -0800 (Sun, 27 Mar 2005)
Revision: 7055
Log message:
Added spill allocation. Mmc_spill_test/test1 now works.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 09:53:13 -0800 (Sun, 27 Mar 2005)
Revision: 7056
Log message:
Preparing for spilled function parameters.
The idea here is to tag the parameter types as representing
spills or registers. We have to extend the function type, and
this will cause fairly extensive changes throughout the backend.
Changes | Path |
+16 -1 | mpcompiler/mmc/arch/x86/base/mmc_x86_asm.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 13:48:32 -0800 (Sun, 27 Mar 2005)
Revision: 7057
Log message:
Updated polymorphism in Aleksey's sweeper, and ported it to the backend.
This is really cool--it caught several sweep errors in the backend.
A short note on the style used in the grammars (I know I should
document this). When we define a new kind of term, the general
style is to define a "proper" term that does not include variables.
production proper_foo{'e} <-- ...
Then add the variables:
production foo{'e} <-- sovar{'e}
production foo{'e} <-- tok_quotation{'e}
production foo{'e} <-- proper_foo{'e}
The so_arg{'e} represents arbitrary expressions. If it is not
ambiguous, add a proper_so_arg{'e}. This is mainly so we don't
have to type so much.
production proper_so_arg{'e} <-- proper_foo{'e} (* Optional *)
Then add the named so_arg. Note that we use the generic foo{'e}
here.
production proper_so_arg{'e} <-- tok_foo; foo{'e}
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 14:00:35 -0800 (Sun, 27 Mar 2005)
Revision: 7058
Log message:
Forgot to add cases for definitions.
Changes | Path |
+4 -0 | mpcompiler/mmc/arch/x86/codegen/mmc_x86_closure.ml |
+2 -2 | mpcompiler/mmc/arch/x86/type/mmc_x86_sweep.ml |
+10 -2 | mpcompiler/mmc/arch/x86/type/mmc_x86_sweep.mli |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 22:19:03 -0800 (Sun, 27 Mar 2005)
Revision: 7063
Log message:
Whew, added spilling for function parameters.
This isn't quite as nice as I would like, but it is adequate.
Ideally, I would like to give spills a different type, like
ATySpill{'ty}
for a spilled value of type 'ty. However, this seems nearly
impossible because when we spill a parameter, all the types
everywhere have to be changed.
Perhaps I am not thinking of this correctly.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-27 22:45:35 -0800 (Sun, 27 Mar 2005)
Revision: 7064
Log message:
Mmc_x86_print should be using dest_register_operand on
instructions.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-29 10:11:54 -0800 (Tue, 29 Mar 2005)
Revision: 7065
Log message:
Various minor fixing in spilling. We were using typeof, which
required a sweep *after* spilling, which is a bad idea because
of renaming. Instead, carry the type around with the spilled
value.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-29 11:26:43 -0800 (Tue, 29 Mar 2005)
Revision: 7066
Log message:
Strip constrains, since they prevent beta-reduction.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-29 19:36:09 -0800 (Tue, 29 Mar 2005)
Revision: 7068
Log message:
Added argument spilling, where we have escaping functions with
more than 4 arguments (on x86).
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-30 19:50:12 -0800 (Wed, 30 Mar 2005)
Revision: 7070
Log message:
This is mainly a white-space correction, using <:tast_rw< ... >>
instead of two separate <:tast< ... >>.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-30 20:30:55 -0800 (Wed, 30 Mar 2005)
Revision: 7071
Log message:
Ouch, we were closing over functions too. In closure, filter out
free function variables.
Changes | Path |
+12 -2 | mpcompiler/mmc/core/mmc_core_closure.ml |
+62 -26 | mpcompiler/mmc/core/mmc_core_sweep.ml |
+17 -1 | mpcompiler/mmc/core/mmc_core_sweep.mli |
Properties | mpcompiler/mmc/test |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-31 10:15:33 -0800 (Thu, 31 Mar 2005)
Revision: 7073
Log message:
We needed to be more careful during hoisting because the hoisted
values may depend on recursively-defined functions.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2005-03-31 10:44:18 -0800 (Thu, 31 Mar 2005)
Revision: 7074
Log message:
Whew, mmc_int_test/test_fib now works. This had some problems
during hoisting.
Also, I reintroduced the "front" stage, but don't worry,
all it does now is convert short-circuit operations to
conditionals.