vim9asm's People
vim9asm's Issues
Disassemble functions generated by higher-level functions
Consider this script:
vim9script
def Map(F: func(any): any): func(any): any
return (x) => {
return F(x)
}
enddef
const G = Map((s) => str2nr(s))
Is it possible to get a disassembly of G
?
Edit: Fix typo
Some hints improvements
- There is only one instruction per line, not sure why it is required to put cursor on instruction word to show it.
- Maybe would be good to show virtual text of instructions instead of popup window with some option. Maybe even for every line (so cursor movement would not be required).
Disassemble local functions?
Thanks for this, it's really useful! Is it possible to disassemble script-local functions? I hoped that this would work:
def F()
# ...
enddef
defcompile
Disassemble F
but that results in E1061: Cannot find function F
. Note that the built-in disassemble F
would print the instructions to the command line.
Sometimes, :Disassemble cannot complete functions
I sometimes try to complete a function's name at the command prompt without success, despite the fact that the function is compiled. I can reproduce it with this script:
vim9script
def Success(ctx: dict<any>, value: any): dict<any>
return { success: true }
enddef
def Failure(ctx: dict<any>, value: any): dict<any>
return { success: false }
enddef
def Str(match: string): func(dict<any>): dict<any>
return (d) => {
return d
}
enddef
defcompile
Steps to reproduce:
source %
:Disassemble *St<tab>
After pressing Tab, I would expect *St
to be expanded to something like <SNR>_NN_Str(
, but that does not happen. I can complete the other two functions, though (if it works for you with all the functions, try sourcing the script once more, then try completing again). On the other hand, completing with the built-in :disassemble
works fine.
Using Vim 8.2.3350 and the current vim9asm master.
Feature request: jump to <lambda> definition
Consider a function returning a lambda, e.g.:
def g:I(): func(any): any
return (x) => (x)
enddef
When I Disassemble
this, I get something like:
I
return (x) => (x)
0 FUNCREF <lambda>200
1 RETURN
It would be nice if the plugin would allow you to jump to the definition of the lambda, perhaps with CTRL-].
add gif
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.