diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-12-28 19:06:49 +0100 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-02-02 21:39:19 +0100 |
commit | 03f00fe232c35189682341e39fac487ed2a70a8c (patch) | |
tree | 51a655a2d47be582f1fedb4513b1508181acc00c /docs | |
parent | 6f89da9e55315a2299ae8c4ab8c772936b862a85 (diff) | |
download | scala-03f00fe232c35189682341e39fac487ed2a70a8c.tar.gz scala-03f00fe232c35189682341e39fac487ed2a70a8c.tar.bz2 scala-03f00fe232c35189682341e39fac487ed2a70a8c.zip |
[vpm] __match determines match semantics; virtualization
determine match strategy by typing `__match`
factored out the interface to generate code in this monad, cleaned up codegen a bit
no longer solving a context bound to determine the match strategy and the monad's type constructor
it's too expensive
don't consider implicits looking for __match
implicit search causes HUGE slowdowns -- now the overhead is about 4% compared to just assuming there's no __match in scope
to support virtualization&staging, we use the type of `__match.one` as the prototype for how to wrap "pure" types and types "in the monad"
pure types T are wrapped as P[T], and T goes into the monad as M[T], if one is defined as:
def one[T](x: P[T]): M[T]
for staging, P will typically be the Rep type constructor, and type M[T] = Rep[Option[T]]
furthermore, naive codegen no longer supplies type information -- type inference will have to work it out
optimized codegen still does, of course, and that's enough since we only bootstrap that way
TODO: improve the test (currently the condition is not represented)
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions