Skip to content
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

improved IR #15609

Merged
merged 6 commits into from
Mar 29, 2016
Merged

improved IR #15609

merged 6 commits into from
Mar 29, 2016

Conversation

JeffBezanson
Copy link
Member

#15181 rebased.

@vtjnash
Copy link
Member

vtjnash commented Mar 24, 2016

you need to not add [ci skip] to the commit message so that CI can be allowed to run on this

@JeffBezanson
Copy link
Member Author

Yes, that's kind of a remnant. I'm going to add a bit more to this before merging anyway.

@@ -166,7 +166,7 @@ function show_spec_linfo(io::IO, frame::StackFrame)
else
linfo = get(frame.outer_linfo)
if isdefined(linfo, 8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isdefined(linfo, :specTypes) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

this avoids needing to repeatedly look up labels when interpreting or
analyzing code.
wrap static parameters with (static-parameter  )
LambdaInfo.ast is now LambdaInfo.code, and is just an array of
statements

store LambdaInfo objects in the tfunc cache, instead of just ASTs

now type inference operates on InferenceState.linfo in place, and
eventually copies the results to InferenceState.destination if
necessary.
@KristofferC
Copy link
Member

I have no idea what this is but I am excited anyway! 🎉

@vtjnash vtjnash mentioned this pull request Mar 29, 2016
size_t ngensym = (jl_is_array(gensym_types) ? jl_array_len(gensym_types) : jl_unbox_long(gensym_types));
li->slotnames = jl_alloc_cell_1d(nslots);
li->slottypes = jl_nothing;
li->slotflags = jl_alloc_array_1d(jl_array_uint8_type, nslots);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing wbs? (here and above)

@JeffBezanson
Copy link
Member Author

I should summarize:

  • The compiler is faster; sysimg build should be noticeably faster.
  • Code reflection is easier since more things are in named struct members instead of squirrelled away in expressions
  • Compiler code is simpler
  • When handling code, you don't need to go through a symbol lookup process. Everything in the IR tells you immediately what it is (i.e. local, global, or static parameter).
  • Makes it easier to implement an even more efficient code representation in the future

li->fptr = fptr;
li->name = sname;
// TODO jb/functions: what should li->ast be?
li->ast = (jl_value_t*)jl_exprn(lambda_sym,0); jl_gc_wb(li, li->ast);
li->code = (jl_array_t*)jl_an_empty_cell; jl_gc_wb(li, li->code);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wb can actually be removed but is fine to keep..

@JeffBezanson
Copy link
Member Author

@yuyichao Thanks I will fix those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants