You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I researched like SingletonPredictionContext class implemented. I don't sure but SingletonPredictionContext doesn't have property EMPTY_RETURN_STATE always because PredictionContext.call(this, hashString); (
) doesn't give this property to SingletonPredictionContext. .call(this,...) doesn't translate properties from prototype to children. Need to use Object.create or PredictionContext.EMPTY_RETURN_STATE in line 191 for this.
Does it a bug or mistake or typo?
The text was updated successfully, but these errors were encountered:
Indeed this is a typo, the code should read PredictionContext.EMPTY_RETURN_STATE
Thanks for pointing this, however Not sure it has any impact on performance
I researched like SingletonPredictionContext class implemented. I don't sure but SingletonPredictionContext doesn't have property EMPTY_RETURN_STATE always because PredictionContext.call(this, hashString); (
) doesn't give this property to SingletonPredictionContext. .call(this,...) doesn't translate properties from prototype to children. Need to use Object.create or PredictionContext.EMPTY_RETURN_STATE in line 191 for this.
Does it a bug or mistake or typo?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
You are right, it has not impact on performance. I just found the typo. But it can have impact on algorithm and logic. Not sure, need more research.
Thanks.
Hi.
I searched some ways for optimization in ANTLR for JavaScript and found one strange line in code:
antlr4/runtime/JavaScript/src/antlr4/PredictionContext.js
Line 191 in d0fb48c
I researched like SingletonPredictionContext class implemented. I don't sure but SingletonPredictionContext doesn't have property EMPTY_RETURN_STATE always because PredictionContext.call(this, hashString); (
antlr4/runtime/JavaScript/src/antlr4/PredictionContext.js
Line 136 in d0fb48c
Does it a bug or mistake or typo?
The text was updated successfully, but these errors were encountered: