mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS/JIT: Provide source location information for JIT code
This works by walking a backtrace until the currently executing native executable is found, and then mapping the native address to its bytecode instruction.
This commit is contained in:
parent
112eadc863
commit
fb7b4b9c59
8 changed files with 59 additions and 6 deletions
|
@ -15,9 +15,12 @@
|
|||
#include <LibJS/Bytecode/Label.h>
|
||||
#include <LibJS/Bytecode/StringTable.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/JIT/NativeExecutable.h>
|
||||
#include <LibJS/Runtime/EnvironmentCoordinate.h>
|
||||
|
||||
namespace JS::JIT {
|
||||
class NativeExecutable;
|
||||
}
|
||||
|
||||
namespace JS::Bytecode {
|
||||
|
||||
struct PropertyLookupCache {
|
||||
|
@ -70,6 +73,7 @@ public:
|
|||
void dump() const;
|
||||
|
||||
JIT::NativeExecutable const* get_or_create_native_executable();
|
||||
JIT::NativeExecutable const* native_executable() const { return m_native_executable; }
|
||||
|
||||
private:
|
||||
OwnPtr<JIT::NativeExecutable> m_native_executable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue