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

Support `inline call()` and `inline new C()` expressions #7425

Merged
merged 11 commits into from Sep 21, 2018

Conversation

Projects
None yet
1 participant
@Simn
Copy link
Member

Simn commented Sep 12, 2018

This is an implementation of HaxeFoundation/haxe-evolution#45.

It allows using inline someCallExpression() and inline new SomeConstructor() to force inlining.

The majority of the change is related to the fact that we now have to store the expression of every local function in v_extra. This should be acceptable from a memory usage point of view because it only applies to local function variables.

I'll still have to do some sanity checks, such as using this on extern functions and in situations where constructor inlining is canceled. I'd still like to merge this soon to avoid conflicts.

@Simn Simn added this to the Release 4.0 milestone Sep 12, 2018

@skial skial referenced this pull request Sep 12, 2018

Closed

Haxe Roundup 447 #540

1 of 1 task complete

Simn added some commits Sep 13, 2018

Merge branch 'development' into expr_inline
# Conflicts:
#	src/context/typecore.ml
#	src/typing/typer.ml
Merge branch 'development' into expr_inline
# Conflicts:
#	src/core/json/genjson.ml
#	src/core/meta.ml
#	src/typing/typer.ml
@Simn

This comment has been minimized.

Copy link
Member

Simn commented Sep 21, 2018

Checked two things:

  • inlining non-statics works as expected
  • inlining externs silently ignores the inline. I'm not sure if we have to detect that and error.

Simn added some commits Sep 21, 2018

@Simn

This comment has been minimized.

Copy link
Member

Simn commented Sep 21, 2018

Given that we're going to need an "is overridden" flag to check for invalid overrides, I'd like to deal with #7382 first so we can just add that as a bit flag.

@Simn

This comment has been minimized.

Copy link
Member

Simn commented Sep 21, 2018

I'll merge this first though to avoid conflicts. CI is fine, it just doesn't know that yet.

@Simn Simn merged commit 97f2641 into HaxeFoundation:development Sep 21, 2018

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details

@Simn Simn deleted the Simn:expr_inline branch Sep 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment