Sigrid Solveig Haflínudóttirdoc: update new opcode additionb05e9253 months agoHistory
25 lines · 780 B · Markdown
RawDownload

Development tips and tricks

How to enter λ, ‼ and ↳

On Unix-like operating systems running either X or Wayland:

; example of ~/.XCompose
include "%L"
<Multi_key> <parenleft> <parenleft> : "λ" U03BB
<Multi_key> <e> <n> : "↳" U21B3
<Multi_key> <2> <exclam> : "‼" U203C

Adding a new VM opcode

  • add the new opcode to tools/gen.sl (place it at the end of the ops vector).
  • bootstrap (ninja -C build bootstrap)
  • add the new opcode handling logic to src/vm_jmptbl.c and src/vm_funcs.c
  • build
  • update the compiler to emit the opcode when needed
  • bootstrap again

Run ./build/sl tools/disenv.sl before and after, compare the outputs with diff - this will show how the newly built environment looks like in VM instructions assembly.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t