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

JSCompiler: cache, runtime implicit parameters... #3090

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

xBZZZZ
Copy link
Contributor

@xBZZZZ xBZZZZ commented Aug 1, 2022

runtime implicit parameters

very basic function cache

  • it's JSCompiler.prototype.functionCache array
  • is cleared before pushing new function if length ≥ 300
  • JSCompiler.prototype.compileFunction code makes more sense than my explanation

⚡ blocks now work with compiled rings (not with any other functions)

  • ⚡ blocks will error if can't compile instead of synchronously running not compiled rings
  • compiled rings have inputs property: array of explicit parameter names of original (not compiled ring)

changed how , , , are compiled

@jmoenig
Copy link
Owner

jmoenig commented Aug 2, 2022

This is very nice, thank you so much!
I love the changes you made to make the implicit parameter count obsolete, and also the introduction of a simple cache. But I think we do need the fallback to simply run a function that is not (yet) compilable in the "flash" blocks (instead of throwing a compile-error), because some of our existing libraries occasionally rely on this. Can you make that possible again? Thank you!

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Aug 2, 2022

But I think we do need the fallback to simply run a function that is not (yet) compilable in the "flash" blocks (instead of throwing a compile-error), because some of our existing libraries occasionally rely on this.

Maybe make it fallback to behave like non-:zap: blocks instead of synchronously running snap rings.

Also how to edit pull request code?
edit: edit fork

Also why Process.prototype.reportAtomicSort exists but there is no sort block?
edit: it's used in extensions.js

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Aug 3, 2022

added lst_sort(list, fn) without JS compiling and dta_group(list, fn) without JS compiling extensions

made ⚡ blocks behave like non-⚡ blocks if can't compile

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Aug 4, 2022

about commit cad3a6e

made it return null because returns null

it might look like empty string but

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Aug 16, 2022

is anyone reading this?

about commit ef1032f

now reports 4 instead of 1

@WarpedWartWars
Copy link
Contributor

is anyone reading this?

Yes.

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Aug 21, 2022

about commits 2de90b3 and a3116e7

this now works:

@xBZZZZ
Copy link
Contributor Author

xBZZZZ commented Sep 2, 2022

cache is broken because (forum link)

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

Successfully merging this pull request may close these issues.

None yet

3 participants