Open
Conversation
Owner
Author
|
再帰呼び出しで壊れたので修正を試みます。 |
Owner
Author
|
LuaClosureの実行完了後にスタックを |
Owner
Author
|
|
Owner
Author
|
メモ: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LuaClosureが頻繁に実行されるとgetNewStackが頻繁に呼び出され大量のstackが生成されメモリを圧迫するのでキャッシュ化。各インスタンスごとに20件まで (seeMAX_STACK_CACHE_SIZE) をStack<LuaValue[]>で管理する。Stack<>で管理している理由実行終了前 (
stack解放前) に再帰呼び出しなどによって同じインスタンスが実行される場合、新たなstackが必要になり、単一のキャッシュを使い回すことができない。そのため、実行が完了した際にキャッシュに回し、それをCollectionで複数管理する方針を採用した。また、
stackのサイズが異なる場合は再生成が必要になるため、 LIFO Stack を使用することで、同じ階層での呼び出しで同じサイズのstackを再利用させることによる再生成の抑制を狙った。注意点
luaj-jse-3.0.2-custom.jar.zip