Skip to content

Pullrequest/scalareflectjar for todays nightly#2

Closed
jsuereth wants to merge 2 commits intoscalamacros:pullrequest/scalareflectjar-for-todays-nightlyfrom
jsuereth:pullrequest/scalareflectjar-for-todays-nightly
Closed

Pullrequest/scalareflectjar for todays nightly#2
jsuereth wants to merge 2 commits intoscalamacros:pullrequest/scalareflectjar-for-todays-nightlyfrom
jsuereth:pullrequest/scalareflectjar-for-todays-nightly

Conversation

@jsuereth
Copy link

@jsuereth jsuereth commented Jun 5, 2012

  • Naming issues FTW!

@jsuereth
Copy link
Author

jsuereth commented Jun 6, 2012

@xeno-by Note: These too patches have to be in the final reflect.jar breakout for it to work...

@xeno-by
Copy link
Member

xeno-by commented Jun 6, 2012

Cherry-picked the changes, thanks!

@xeno-by xeno-by closed this Jun 6, 2012
xeno-by pushed a commit that referenced this pull request Jul 9, 2012
- fixed the AnyRef linking (SI-5780)
- added tooltips to implicit conversions in diagrams
- fixed the intermittent dot error where node images would be left out
(dot is not reliable at all -- with all the mechanisms in place to fail
gracefully, we still get dot errors crawling their way into diagrams -
and that usually means no diagram generated, which is the most
appropriate way to fail, I think...)
odersky added a commit that referenced this pull request Jul 20, 2012
adriaanm pushed a commit that referenced this pull request Aug 7, 2012
…ion-pull-request

Ultimate reflection pull request #2
xeno-by added a commit that referenced this pull request Sep 27, 2012
Turns importer caches into fully weak hash maps, and also applies
manual cleanup to toolboxes every time they are used.

It's not enough, because reflection-mem-typecheck test is still leaking
at a rate of ~100kb per typecheck, but it's much better than it was before.
We'll fix the rest later, after 2.10.0-final.

For more information, see https://issues.scala-lang.org/browse/SI-6412 and
http://groups.google.com/group/scala-internals/browse_thread/thread/eabcf3d406dab8b2

In comparison with scala@b403c1d,
the original commit that implemented the fix, this one doesn't crash tests.
The problem with the original commit was that it called tryFixup() before
updating the cache, leading to stack overflows.
xeno-by pushed a commit that referenced this pull request Sep 27, 2012
SI-6412 alleviates leaks in toolboxes, attempt #2
xeno-by added a commit that referenced this pull request Feb 2, 2013
First of all, GIL should only apply to runtime reflection, because noone
is going to run toolboxes in multiple threads: a) that's impossible, b/c
the compiler isn't thread safe, b) ToolBox api prevents that.

Secondly, the only things in symbols which require synchronization are:
1) info/validTo (completers aren't thread-safe),
2) rawInfo and its dependencies (it shares a mutable field with info)
3) non-trivial caches like in typeAsMemberOfLock

If you think about it, other things like sourceModule or associatedFile
don't need synchronization, because they are either set up when a symbol
is created or cloned or when it's completed.

We can say that symbols can be in four possible states: 1) being created,
2) created, but not yet initialized, 3) initializing, 4) initialized.
single thread. #2 and #4 don't need synchronization either, because the
only mutation symbols in runtime reflection can undergo is init. #3 is
dangerous and needs protection.
xeno-by added a commit that referenced this pull request Feb 2, 2013
First of all, GIL should only apply to runtime reflection, because noone
is going to run toolboxes in multiple threads: a) that's impossible, b/c
the compiler isn't thread safe, b) ToolBox api prevents that.

Secondly, the only things in symbols which require synchronization are:
1) info/validTo (completers aren't thread-safe),
2) rawInfo and its dependencies (it shares a mutable field with info)
3) non-trivial caches like in typeAsMemberOfLock

If you think about it, other things like sourceModule or associatedFile
don't need synchronization, because they are either set up when a symbol
is created or cloned or when it's completed.

We can say that symbols can be in four possible states: 1) being created,
2) created, but not yet initialized, 3) initializing, 4) initialized.
single thread. #2 and #4 don't need synchronization either, because the
only mutation symbols in runtime reflection can undergo is init. #3 is
dangerous and needs protection.
xeno-by added a commit that referenced this pull request Feb 6, 2013
First of all, GIL should only apply to runtime reflection, because noone
is going to run toolboxes in multiple threads: a) that's impossible, b/c
the compiler isn't thread safe, b) ToolBox api prevents that.

Secondly, the only things in symbols which require synchronization are:
1) info/validTo (completers aren't thread-safe),
2) rawInfo and its dependencies (it shares a mutable field with info)
3) non-trivial caches like in typeAsMemberOfLock

If you think about it, other things like sourceModule or associatedFile
don't need synchronization, because they are either set up when a symbol
is created or cloned or when it's completed.

We can say that symbols can be in four possible states: 1) being created,
2) created, but not yet initialized, 3) initializing, 4) initialized.
single thread. #2 and #4 don't need synchronization either, because the
only mutation symbols in runtime reflection can undergo is init. #3 is
dangerous and needs protection.
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.

2 participants