v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::LiveEdit Class Reference

#include <liveedit.h>

Inheritance diagram for v8::internal::LiveEdit:
Collaboration diagram for v8::internal::LiveEdit:

Static Public Member Functions

static void CompareStrings (Isolate *isolate, Handle< String > a, Handle< String > b, std::vector< SourceChangeRange > *diffs)
 
static int TranslatePosition (const std::vector< SourceChangeRange > &changed, int position)
 
static void PatchScript (Isolate *isolate, Handle< Script > script, Handle< String > source, bool preview, bool allow_top_frame_live_editing, debug::LiveEditResult *result)
 

Detailed Description

Liveedit step-by-step:

  1. calculate diff between old source and new source,
  2. map function literals from old source to new source,
  3. create new script for new_source,
  4. mark literals with changed code as changed, all others as unchanged,
  5. check that for changed literals there are no:
    • running generators in the heap,
    • non droppable frames (e.g. running generator) above them on stack.
  6. mark the bottom most frame with changed function as scheduled for restart if any,
  7. for unchanged functions:
    • deoptimize,
    • remove from cache,
    • update source positions,
    • move to new script,
    • reset feedback information and preparsed scope information if any,
    • replace any sfi in constant pool with changed one if any.
  8. for changed functions:
    • deoptimize
    • remove from cache,
    • reset feedback information,
    • update all links from js functions to old shared with new one.
  9. swap scripts.

Definition at line 57 of file liveedit.h.

Member Function Documentation

◆ CompareStrings()

void v8::internal::LiveEdit::CompareStrings ( Isolate * isolate,
Handle< String > a,
Handle< String > b,
std::vector< SourceChangeRange > * diffs )
static

Definition at line 1084 of file liveedit.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PatchScript()

void v8::internal::LiveEdit::PatchScript ( Isolate * isolate,
Handle< Script > script,
Handle< String > source,
bool preview,
bool allow_top_frame_live_editing,
debug::LiveEditResult * result )
static

Definition at line 834 of file liveedit.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TranslatePosition()

int v8::internal::LiveEdit::TranslatePosition ( const std::vector< SourceChangeRange > & changed,
int position )
static

Definition at line 1102 of file liveedit.cc.


The documentation for this class was generated from the following files: