-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement missing type methods (typer layer) #358
Conversation
cb2adaa
to
0505f66
Compare
56cdc54
to
152c55a
Compare
8137aec
to
1bce5f1
Compare
64f096f
to
b8776f4
Compare
1bce5f1
to
c83ce4c
Compare
b8776f4
to
87ad4d0
Compare
717b89e
to
9891b78
Compare
9891b78
to
63bb585
Compare
} | ||
|
||
property("SCollection.flatMap") { | ||
testMissingCosting("OUTPUTS.flatMap({ (out: Box) => Coll(out.value >= 1L) })", | ||
comp("OUTPUTS.flatMap({ (out: Box) => Coll(out.value >= 1L) })") shouldBe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greenhat The flatMap can accept only limited lambdas as arguments.
Currently:
x => x._1
box => MethodCall(box, name, List())
x: Coll[T] => x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put this requirements into description of method call both LangSpec.md and special.collection.Colls.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aslesarenko Done. What's the reason for this limitation? I'm struggling to find where and how it's enforced.
e7c41e8
to
1309475
Compare
accf789
to
602738f
Compare
… methods in the typer;
add Apply(Select) to MethodCallLike transformation in binder for collections; implement irBuilder for getOrElse method; add indices and flatMap methods;
add toBytes and toBits methods to numeric types;
add Apply(Select)/Select to MethodCall transformation to typer(via method.irBuilder); add SBigInt.multModQ method;
add SOption.toColl method;
add CONTEXT.dataInputs to MethodCall translation;
…lt type to args); add eval tests for flatMap, indices and indexOf;
08ecf81
to
4c35205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#324
Close #344
Todo:
v2.0
after Add missing non-method ops (typer layer) #347 is merged;SCollection.zip
,partition
type cannot be expressed (circular dependency onSTuple
);SCollection.mapReduce
;CompiletimeCosting
intoSMethod.irBuilder
;MethodCall
based collection method through the costing;MethodCall
based) pulled through the costing in interpreter;costOf(node)
forMethodCall
ops (RuntimeCosting);special.sigma
appending of the result type of the lambda to arg list onMethodCall
eval and also for other methods with RType implicit argument (if any) cmt