Luke Gorrie

Results 165 issues of Luke Gorrie

Here is a simple learning exercise: How does this example program compile? ```lua -- main loop calls subroutines a->b->c to reach an inner loop. function main() for i=1,100 do a()...

exercise

Exercise #121 asked how the JIT would compile this example program: ```lua -- main loop calls subroutines a->b->c to reach an inner loop. function main() for i=1,100 do a() end...

exercise

Infrequently Answered Question: What happens when the JIT is recording a trace and it enters a Lua function call? There are actually three cases in `lj_record_ins()` of `lj_record.c`: 1. For...

IAF

Problem: The `GCSTEP` instruction has unpredictable performance, contrary to goal #105, because it can be optimized away during assembly. Solution: This optimization should be applied during IR optimization instead of...

enhancement

I have only today realized an important distinction about [NYIs](http://wiki.luajit.org/NYI). There are two different kinds of NYI, bytecodes verses library calls, and that are treated very differently. NYI _bytecodes_ cause...

info

The [internal types in `lj_obj.h`](https://github.com/raptorjit/raptorjit/blob/master/src/lj_obj.h#L203-L217) are defined with the bitwise complement operand `~` (e.g. `#define LJ_TNIL (~0u)`) and often referenced with the complement removed (`~LJ_TNIL`). How come? Why not just...

question

I am confused by this [line in `lj_record.c`](https://github.com/raptorjit/raptorjit/blob/master/src/lj_record.c#L2058): ```c if (rc == ~LJ_TNUMX+2) ``` What is the meaning of value `~LJ_TNUMX+2`? How is that assigned? My understanding is that `LJ_TNUMX`...

question

I don't see where the compiler emits the `ISTYPE` and `ISNUM` bytecodes. Are they used? Where?

question

I have to understand how stack frames and unwinding works. I also want to understand whether this can be simplified by dropping support for some complex scenarios e.g. exceptions propagating...

question

### Problem Statement Side traces do not take their parent traces into account when performing optimizations like Dead Code Elimination (DCE) and Common Subexpression Elimination (CSE). This causes side traces...

bug