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

Initial refactor of InferCtxt towards unified type checking state and per item side tables #26582

Merged
merged 5 commits into from Jun 29, 2015

Conversation

Projects
None yet
4 participants
@jroesch
Copy link
Member

jroesch commented Jun 26, 2015

This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local:

  • move FulfillmentContext into InferCtxt
  • modify SelectionContext to only take a single context argument
  • remove remaining typer impls
  • remove the ClosureTyper + Typer trait
  • do some renaming to make these things more applicable to their new roles

r? @nikomatsakis

As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR.

cc @eddyb @Aatch @arielb1 @nrc

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jun 26, 2015

Placing Tables inside InferCtxt is better than what I was considering.
We can then have all the nested inference-only type context be managed by InferCtxt, which would include write-back/lifting Tables<'local> to Tables<'global> by resolving all inference variables.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 26, 2015

☔️ The latest upstream changes (presumably #26415) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 26, 2015

r+ from me once we resolve nits, get things building

@jroesch jroesch referenced this pull request Jun 26, 2015

Closed

Tracking issue for type checking refactor #26597

5 of 6 tasks complete

@jroesch jroesch force-pushed the jroesch:infer-ctxt-refactor branch 3 times, most recently from 4025071 to 57f8253 Jun 26, 2015

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jun 27, 2015

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 27, 2015

📌 Commit 57f8253 has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 27, 2015

☔️ The latest upstream changes (presumably #26575) made this pull request unmergeable. Please resolve the merge conflicts.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 27, 2015

🔒 Merge conflict

jroesch added some commits Jun 24, 2015

Begin refactor type checking state
This first patch starts by moving around pieces of state related to
type checking. The goal is to slowly unify the type checking state
into a single typing context. This initial patch moves the
ParameterEnvironment into the InferCtxt and moves shared tables
from Inherited and ty::ctxt into their own struct Tables. This
is the foundational work to refactoring the type checker to
enable future evolution of the language and tooling.

@jroesch jroesch force-pushed the jroesch:infer-ctxt-refactor branch from 57f8253 to fd412ab Jun 27, 2015

cast_kinds: RefCell::new(NodeMap()),
}, f)
}

This comment has been minimized.

@eddyb

eddyb Jun 27, 2015

Member

This looks like a rebase mishap (this function is gone on master, moved to ctxt::create_and_enter).

@jroesch jroesch force-pushed the jroesch:infer-ctxt-refactor branch from fd412ab to 15bc4a3 Jun 28, 2015

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jun 28, 2015

@bors r=nikomatsakis p=1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 28, 2015

📌 Commit 15bc4a3 has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 28, 2015

⌛️ Testing commit 15bc4a3 with merge 84855fe...

bors added a commit that referenced this pull request Jun 28, 2015

Auto merge of #26582 - jroesch:infer-ctxt-refactor, r=nikomatsakis
This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local:

- [ ] move FulfillmentContext into InferCtxt
- [ ] modify SelectionContext to only take a single context argument
- [ ] remove remaining typer impls 
- [ ] remove the ClosureTyper + Typer trait
- [ ] do some renaming to make these things more applicable to their new roles

r? @nikomatsakis 

As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR.

cc @eddyb @Aatch @arielb1 @nrc
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 28, 2015

💔 Test failed - auto-mac-32-opt

@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Jun 28, 2015

@bors r=nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 28, 2015

📌 Commit 5c3753f has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 29, 2015

⌛️ Testing commit 5c3753f with merge a973e4c...

bors added a commit that referenced this pull request Jun 29, 2015

Auto merge of #26582 - jroesch:infer-ctxt-refactor, r=nikomatsakis
This branch begins the work of unifying our type checking contexts into a single piece of state. The goal is to eventually have a single context that we can pass around instead of the fractured situation we currently have. There are still several things that must be done before beginning to make tables item local:

- [ ] move FulfillmentContext into InferCtxt
- [ ] modify SelectionContext to only take a single context argument
- [ ] remove remaining typer impls 
- [ ] remove the ClosureTyper + Typer trait
- [ ] do some renaming to make these things more applicable to their new roles

r? @nikomatsakis 

As a side note there are a couple oddities that are temporary refactors that will be quickly cleaned up in a follow-up PR.

cc @eddyb @Aatch @arielb1 @nrc

@bors bors merged commit 5c3753f into rust-lang:master Jun 29, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@jroesch jroesch deleted the jroesch:infer-ctxt-refactor branch Jun 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.