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
GC Compiler changes #682
GC Compiler changes #682
Conversation
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.
First pass.
|
||
/** | ||
* Created by lukaskellenberger on 08.03.17. | ||
*/ |
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.
We strongly discourage authorship comments in the code as they quickly get out of date.
} | ||
|
||
val moduleArrayName = Global.Top("__modules") | ||
val moduleArraySizeName = Global.Top("__modules_size") |
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.
Those two above should go the GCExternals
companion.
/** | ||
* Created by lukaskellenberger on 08.03.17. | ||
*/ | ||
class GCexternals(top: Top) extends Inject { |
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.
GCExternals
.
val modules = defns.filter { | ||
case _: Defn.Module => true | ||
case _ => false | ||
} |
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.
defns.filter(_.isIntanceOf[Defn.Module])
def genObjectArrayId(): Defn.Var = { | ||
val objectArray = | ||
top.nodes(Global.Top("scala.scalanative.runtime.ObjectArray")) | ||
val objectArrayIdName = Global.Top("__object_array_id") |
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.
The line above should go the companion of GCExternals
.
cd5ef4c
to
a75e3c3
Compare
LGTM! |
__modules
__modules_size
ObjectArray
class__object_array_id
-1
.