SlideShare a Scribd company logo
@ryzokuken
V8 by Example
A journey through the compilation pipeline
1
@ryzokuken
Ujjwal Sharma (@ryzokuken)
● Node.js – Core Collaborator
● Electron.js – Maintainer
● Contribute to the JS/Node.js ecosystem
○ V8
○ TC39
○ libuv
○ …
● Student
● Google Summer of Code
● Speaker
2
@ryzokuken@ryzokuken
What is V8?
3
@ryzokuken@ryzokuken4
@ryzokuken@ryzokuken
How does V8 work?
5
@ryzokuken@ryzokuken6
Source
@ryzokuken@ryzokuken7
Source
Parser
@ryzokuken@ryzokuken8
Source
Parser
@ryzokuken@ryzokuken9
Source
IIFE?
@ryzokuken@ryzokuken10
Source
IIFE?
Eager
@ryzokuken@ryzokuken11
Source
IIFE? Lazy
Eager
@ryzokuken@ryzokuken12
Source
IIFE?
* Eventually
Eager
Lazy
@ryzokuken@ryzokuken13
Source
IIFE?
Eager
Lazy
AST +
Scopes
@ryzokuken@ryzokuken14
Source
Parser
AST +
Scopes
@ryzokuken@ryzokuken15
Source
Parser
AST +
Scopes
Ignition
@ryzokuken@ryzokuken16
Source
Parser
AST +
Scopes
Ignition Bytecode
@ryzokuken@ryzokuken17
Source
Parser
AST +
Scopes
Ignition Bytecode
@ryzokuken@ryzokuken18
But interpreters are so slow!
Idea: Let’s not be slow.
Let’s use a JIT compiler.
@ryzokuken@ryzokuken19
@ryzokuken@ryzokuken20
Source
Parser
AST +
Scopes
Ignition Bytecode
Turbofan
+ profiling data
OPTIMIZE!
@ryzokuken@ryzokuken21
Source
Parser
AST +
Scopes
Ignition Bytecode
Turbofan
Optimized
Code
DEOPTIMIZE!
@ryzokuken@ryzokuken22
Source
Parser
AST +
Scopes
Ignition Bytecode
Turbofan
Optimized
Code
@ryzokuken@ryzokuken
How you feel about everything.
Let’s take a couple steps back.23
@ryzokuken@ryzokuken
How does V8 work?
24
@ryzokuken@ryzokuken
How does V8 work?
a compiler
25
@ryzokuken@ryzokuken
Source
Code
Parser
Abstract
Syntax
Tree
Assembler
Machine
Code (R)
Compiler
Assembly
Program
Linker
Machine
Code (T)
26
@ryzokuken@ryzokuken
Is it simple enough yet?
27
@ryzokuken@ryzokuken
Source
Code
Parser
Abstract
Syntax
Tree
Assembler
Machine
Code (R)
Compiler
Assembly
Program
Linker
Machine
Code (T)
28
@ryzokuken@ryzokuken
Source
Code
Parser
Abstract
Syntax
Tree
Compiler
Machine
Code (T)
29
@ryzokuken@ryzokuken30
BAD NEWS: V8 isn’t this simple
@ryzokuken@ryzokuken
Because ECMAScript is slow by default, that’s why.
31
@ryzokuken@ryzokuken
Idea: Let’s not be slow.
BUT HOW?
Speculative Optimization
32
@ryzokuken@ryzokuken
But wait…
What even is
Speculative Optimization?
33
@ryzokuken@ryzokuken
Speculative Optimization
[spek-yuh-ley-tiv, -luh-tiv][op-tuh-muh-zey-shuh n]
Noun.
Guessing what is about to happen based
on what has happened.
34
@ryzokuken@ryzokuken
Speculative Optimization
[spek-yuh-ley-tiv, -luh-tiv][op-tuh-muh-zey-shuh n]
Noun.
Guessing what is about to happen based
on what has happened.
Making assumptions about possible
future inputs based on previous inputs.
35
@ryzokuken@ryzokuken
Top three reasons why a JavaScript
function might need optimization:
1. Dynamic Types
2. Dynamic Types
3. Dynamic Types
Alright, but how does it help?
36
@ryzokuken@ryzokuken
Source
Code
Parser
Abstract
Syntax
Tree
Compiler
Machine
Code (T)
37
@ryzokuken@ryzokuken
Source
Code
Parser
Abstract
Syntax
Tree
1. Baseline Interpreter
2. Optimizing Compiler
Machine
Code (T)
38
@ryzokuken@ryzokuken
AST
Baseline
Interpreter
Optimizing
Compiler
Bytecode
Optimized Code
optimize
deoptimize
39
@ryzokuken@ryzokuken
Compiler
Baseline
Interpreter
Optimizing
Compiler
40
@ryzokuken@ryzokuken
AST
Baseline
Interpreter
Optimizing
Compiler
Bytecode
Optimized Code
optimize
deoptimize
41
@ryzokuken@ryzokuken
AST
Bytecode
Optimized Code
optimize
deoptimize
42
@ryzokuken@ryzokuken43
Okay, that’s great.
But how does it even work?
Let’s consider an example.
@ryzokuken@ryzokuken44
function add(x, y) {
return x + y;
}
console.log(add(1, 2));
@ryzokuken@ryzokuken45
Not too intuitive?
I’ve got you covered, fam.
Let’s see how the Abstract Syntax Tree actually looks.
@ryzokuken@ryzokuken46
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
@ryzokuken@ryzokuken47
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
@ryzokuken@ryzokuken48
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
@ryzokuken@ryzokuken49
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add”
@ryzokuken@ryzokuken50
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS
@ryzokuken@ryzokuken51
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS
VAR “x”
@ryzokuken@ryzokuken52
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS
VAR “x” VAR “y”
@ryzokuken@ryzokuken53
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS RETURN
VAR “x” VAR “y”
@ryzokuken@ryzokuken54
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS RETURN
VAR “x” VAR “y” ADD
@ryzokuken@ryzokuken55
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS RETURN
VAR “x” VAR “y” ADD
PROXY “x”
@ryzokuken@ryzokuken56
[generating bytecode for function: add]
--- AST ---
FUNC at 12
. KIND 0
. SUSPEND COUNT 0
. NAME "add"
. PARAMS
. . VAR (...) (mode = VAR) "x"
. . VAR (...) (mode = VAR) "y"
. RETURN at 22
. . ADD at 31
. . . VAR PROXY parameter[0] (...) (mode = VAR) "x"
. . . VAR PROXY parameter[1] (...) (mode = VAR) "y"
FUNC
NAME “add” PARAMS RETURN
VAR “x” VAR “y” ADD
PROXY “x” PROXY “y”
@ryzokuken@ryzokuken57
Scope Resolution
FUNC
NAME “add” PARAMS RETURN
VAR “x” VAR “y” ADD
PROXY “y”PROXY “x”
@ryzokuken@ryzokuken58
Let’s step through the bytecode.
Hope you like Assembly.
Once this is done, we can generate bytecode.
@ryzokuken@ryzokuken59
[generated bytecode for function: add]
Parameter count 3
Frame size 0
12 E> 0x38d5f59df42 @ 0 : a5 StackCheck
22 S> 0x38d5f59df43 @ 1 : 25 02 Ldar a1
31 E> 0x38d5f59df45 @ 3 : 34 03 00 Add a0, [0]
35 S> 0x38d5f59df48 @ 6 : a9 Return
Constant pool (size = 0)
Handler Table (size = 0)
@ryzokuken@ryzokuken60
[generated bytecode for function: add]
Parameter count 3
Frame size 0
12 E> 0x38d5f59df42 @ 0 : a5 StackCheck
22 S> 0x38d5f59df43 @ 1 : 25 02 Ldar a1
31 E> 0x38d5f59df45 @ 3 : 34 03 00 Add a0, [0]
35 S> 0x38d5f59df48 @ 6 : a9 Return
Constant pool (size = 0)
Handler Table (size = 0)
@ryzokuken@ryzokuken61
[generated bytecode for function: add]
Parameter count 3
Frame size 0
12 E> 0x38d5f59df42 @ 0 : a5 StackCheck
22 S> 0x38d5f59df43 @ 1 : 25 02 Ldar a1
31 E> 0x38d5f59df45 @ 3 : 34 03 00 Add a0, [0]
35 S> 0x38d5f59df48 @ 6 : a9 Return
Constant pool (size = 0)
Handler Table (size = 0)
@ryzokuken@ryzokuken62
[generated bytecode for function: add]
Parameter count 3
Frame size 0
12 E> 0x38d5f59df42 @ 0 : a5 StackCheck
22 S> 0x38d5f59df43 @ 1 : 25 02 Ldar a1
31 E> 0x38d5f59df45 @ 3 : 34 03 00 Add a0, [0]
35 S> 0x38d5f59df48 @ 6 : a9 Return
Constant pool (size = 0)
Handler Table (size = 0)
@ryzokuken@ryzokuken63
StackCheck
Ldar a1
Add a0, [0]
Return
@ryzokuken@ryzokuken64
StackCheck
Ldar a1
Add a0, [0]
Return
@ryzokuken@ryzokuken65
StackCheck
Ldar a1
Add a0, [0]
Return
@ryzokuken@ryzokuken66
StackCheck
Ldar a1
Add a0, [0]
Return
@ryzokuken@ryzokuken67
Two important things happen here.
1. Addition: It’s complicated.
2. Profiling: Feedback Vectors help.
@ryzokuken@ryzokuken68
StackCheck
Ldar a1
Add a0, [0]
Return
@ryzokuken@ryzokuken69
What about that Speculative Optimization thingie he
was talking about earlier?
Now that we finally have the baseline code running,
let’s put that profiling data to good use.
But wait...
@ryzokuken@ryzokuken70
Oh, also, remember that time when
I said addition in JavaScript was
complicated?
@ryzokuken@ryzokuken71
@ryzokuken@ryzokuken72
Let me break it down for you.
@ryzokuken@ryzokuken73
Number
String
Object
@ryzokuken@ryzokuken74
@ryzokuken@ryzokuken75
Remember Feedback Vectors?
Let’s see how they really look to see how it all works.
Awesome! But how do we make that assumption?
@ryzokuken@ryzokuken76
function add(x, y) {
return x + y;
}
console.log(add(1, 2));
@ryzokuken@ryzokuken77
function add(x, y) {
return x + y;
}
console.log(add(1, 2));
%DebugPrint(add);
@ryzokuken@ryzokuken78
...
- feedback vector: 0x18bc7711df89: [FeedbackVector] in OldSpace
- map: 0x18bc38c00bc1 <Map>
- length: 1
- shared function info: 0x18bc7711dc59 <SharedFunctionInfo add>
- optimized code/marker: OptimizationMarker::kNone
- invocation count: 1
- profiler ticks: 0
- slot #0 BinaryOp BinaryOp:SignedSmall {
[0]: 1
}
...
@ryzokuken@ryzokuken79
function add(x, y) {
return x + y;
}
console.log(add(1, 2));
%DebugPrint(add);
@ryzokuken@ryzokuken80
function add(x, y) {
return x + y;
}
console.log(add(1, 2));
console.log(add(1.1, 2.2));
%DebugPrint(add);
@ryzokuken@ryzokuken81
...
- feedback vector: 0xcbd92d1dfe1: [FeedbackVector] in OldSpace
- map: 0x0cbd4f880bc1 <Map>
- length: 1
- shared function info: 0x0cbd92d1dc59 <SharedFunctionInfo add>
- optimized code/marker: OptimizationMarker::kNone
- invocation count: 2
- profiler ticks: 0
- slot #0 BinaryOp BinaryOp:Number {
[0]: 7
}
...
@ryzokuken@ryzokuken82
@ryzokuken@ryzokuken83
Question: Is there a method to all this?
Answer: Yes, it is called the Feedback Lattice.
@ryzokuken@ryzokuken84
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken85
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken86
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken87
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken88
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken89
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken90
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken91
None
SignedSmall
Number
BigIntString
NumberOrOddball
Any
@ryzokuken@ryzokuken92
This data in the Feedback Vectors is used to finally optimize
your code once a function is hot.
When is a function “hot”?
Let’s see what actually happens by explicitly triggering
optimization.
@ryzokuken@ryzokuken93
function add(x, y) {
return x + y;
}
add(1, 2);
@ryzokuken@ryzokuken94
@ryzokuken@ryzokuken95
function add(x, y) {
return x + y;
}
add(1, 2); // Warm up with SignedSmall feedback.
%OptimizeFunctionOnNextCall(add);
add(1, 2); // Optimize and run generated code.
@ryzokuken@ryzokuken96
Question: What did we just do?
@ryzokuken@ryzokuken97
Let’s see the optimized code generated by passing the --
print-opt-code flag to d8.
@ryzokuken@ryzokuken98
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
@ryzokuken@ryzokuken99
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Prologue
@ryzokuken@ryzokuken100
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Check x is Smi
@ryzokuken@ryzokuken101
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Check y is Smi
@ryzokuken@ryzokuken102
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Smi → Word32 (x)
@ryzokuken@ryzokuken103
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Smi → Word32 (y)
@ryzokuken@ryzokuken104
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Add x and y
Overflow Check
@ryzokuken@ryzokuken105
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Result to Smi
@ryzokuken@ryzokuken106
leaq rbx,[rip+0xfffffff9]
movq rbx,[rcx-0x20]
testb [rbx+0xf],0x1
jz 0x198104882dfb <+0x3b>
movq r10,0x10efbfde0 (CompileLazyDeoptimizedCode)
jmp r10
push rbp
movq rbp,rsp
push rsi
push rdi
cmpq rsp,[r13+0x11e8] (root (stack_limit))
jna 0x198104882e55 <+0x95>
movq rdx,[rbp+0x18]
testb rdx,0x1
jnz 0x198104882e7b <+0xbb>
movq rcx,[rbp+0x10]
testb rcx,0x1
jnz 0x198104882e87 <+0xc7>
movq rdi,rcx
shrq rdi, 32
movq r8,rdx
shrq r8, 32
addl rdi,r8
jo 0x198104882e93 <+0xd3>
shlq rdi, 32
movq rax,rdi
movq rsp,rbp
pop rbp
ret 0x18
Epilogue
@ryzokuken@ryzokuken107
Now, let’s try something fun.
@ryzokuken@ryzokuken108
function add(x, y) {
return x + y;
}
add(1, 2); // Warm up with SignedSmall feedback.
%OptimizeFunctionOnNextCall(add);
add(1, 2); // Optimize and run generated code.
@ryzokuken@ryzokuken109
function add(x, y) {
return x + y;
}
add(1, 2); // Warm up with SignedSmall feedback.
%OptimizeFunctionOnNextCall(add);
add(1, 2); // Optimize and run generated code.
add(1.1, 2.2) // DEOPTIMIZE!
@ryzokuken@ryzokuken110
@ryzokuken@ryzokuken111
Note: I’m obviously kidding.
Deoptimization is no laughing matter.
@ryzokuken@ryzokuken112
Let’s see how the code is actually deoptimized by passing the
--trace-deopt flag to d8.
@ryzokuken@ryzokuken113
[deoptimizing (DEOPT eager): begin 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> (opt #0)
@0, FP to SP delta: 24, caller sp: 0x7ffee7bee248]
;;; deoptimize at <add.js:2:12>, not a Smi
reading input frame add => bytecode_offset=0, args=3, height=1, retval=0(#0); inputs:
0: 0x08d97929dbc1 ; [fp - 16] 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)>
1: 0x08d9c6b81521 ; [fp + 32] 0x08d9c6b81521 <JSGlobal Object>
2: 0x08d97929da31 ; rdx 0x08d97929da31 <HeapNumber 1.1>
3: 0x08d97929da41 ; [fp + 16] 0x08d97929da41 <HeapNumber 2.2>
4: 0x08d979281749 ; [fp - 24] 0x08d979281749 <NativeContext[247]>
5: 0x08d92b080e19 ; (literal 2) 0x08d92b080e19 <Odd Oddball: optimized_out>
translating interpreted frame add => bytecode_offset=0, height=8
0x7ffee7bee240: [top + 72] <- 0x08d9c6b81521 <JSGlobal Object> ; stack parameter (input #1)
0x7ffee7bee238: [top + 64] <- 0x08d97929da31 <HeapNumber 1.1> ; stack parameter (input #2)
0x7ffee7bee230: [top + 56] <- 0x08d97929da41 <HeapNumber 2.2> ; stack parameter (input #3)
-------------------------
0x7ffee7bee228: [top + 48] <- 0x00010d2881e8 ; caller's pc
0x7ffee7bee220: [top + 40] <- 0x7ffee7bee290 ; caller's fp
0x7ffee7bee218: [top + 32] <- 0x08d979281749 <NativeContext[247]> ; context (input #4)
0x7ffee7bee210: [top + 24] <- 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> ;
function (input #0)
0x7ffee7bee208: [top + 16] <- 0x08d97929dca1 <BytecodeArray[7]> ; bytecode array
0x7ffee7bee200: [top + 8] <- 0x003900000000 <Smi 57> ; bytecode offset
-------------------------
0x7ffee7bee1f8: [top + 0] <- 0x08d92b080e19 <Odd Oddball: optimized_out> ; accumulator
(input #5)
[deoptimizing (eager): end 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> @0 => node=0,
pc=0x00010d2886c0, caller sp=0x7ffee7bee248, took 1.163 ms]
@ryzokuken@ryzokuken
Don’t worry, I got you.114
@ryzokuken@ryzokuken115
[deoptimizing (DEOPT eager): begin 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> (opt #0)
@0, FP to SP delta: 24, caller sp: 0x7ffee7bee248]
;;; deoptimize at <add.js:2:12>, not a Smi
reading input frame add => bytecode_offset=0, args=3, height=1, retval=0(#0); inputs:
0: 0x08d97929dbc1 ; [fp - 16] 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)>
1: 0x08d9c6b81521 ; [fp + 32] 0x08d9c6b81521 <JSGlobal Object>
2: 0x08d97929da31 ; rdx 0x08d97929da31 <HeapNumber 1.1>
3: 0x08d97929da41 ; [fp + 16] 0x08d97929da41 <HeapNumber 2.2>
4: 0x08d979281749 ; [fp - 24] 0x08d979281749 <NativeContext[247]>
5: 0x08d92b080e19 ; (literal 2) 0x08d92b080e19 <Odd Oddball: optimized_out>
translating interpreted frame add => bytecode_offset=0, height=8
0x7ffee7bee240: [top + 72] <- 0x08d9c6b81521 <JSGlobal Object> ; stack parameter (input #1)
0x7ffee7bee238: [top + 64] <- 0x08d97929da31 <HeapNumber 1.1> ; stack parameter (input #2)
0x7ffee7bee230: [top + 56] <- 0x08d97929da41 <HeapNumber 2.2> ; stack parameter (input #3)
-------------------------
0x7ffee7bee228: [top + 48] <- 0x00010d2881e8 ; caller's pc
0x7ffee7bee220: [top + 40] <- 0x7ffee7bee290 ; caller's fp
0x7ffee7bee218: [top + 32] <- 0x08d979281749 <NativeContext[247]> ; context (input #4)
0x7ffee7bee210: [top + 24] <- 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> ;
function (input #0)
0x7ffee7bee208: [top + 16] <- 0x08d97929dca1 <BytecodeArray[7]> ; bytecode array
0x7ffee7bee200: [top + 8] <- 0x003900000000 <Smi 57> ; bytecode offset
-------------------------
0x7ffee7bee1f8: [top + 0] <- 0x08d92b080e19 <Odd Oddball: optimized_out> ; accumulator
(input #5)
[deoptimizing (eager): end 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> @0 => node=0,
pc=0x00010d2886c0, caller sp=0x7ffee7bee248, took 1.163 ms]
@ryzokuken@ryzokuken116
[deoptimizing (DEOPT eager): begin 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> (opt #0)
@0, FP to SP delta: 24, caller sp: 0x7ffee7bee248]
;;; deoptimize at <add.js:2:12>, not a Smi
reading input frame add => bytecode_offset=0, args=3, height=1, retval=0(#0); inputs:
0: 0x08d97929dbc1 ; [fp - 16] 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)>
1: 0x08d9c6b81521 ; [fp + 32] 0x08d9c6b81521 <JSGlobal Object>
2: 0x08d97929da31 ; rdx 0x08d97929da31 <HeapNumber 1.1>
3: 0x08d97929da41 ; [fp + 16] 0x08d97929da41 <HeapNumber 2.2>
4: 0x08d979281749 ; [fp - 24] 0x08d979281749 <NativeContext[247]>
5: 0x08d92b080e19 ; (literal 2) 0x08d92b080e19 <Odd Oddball: optimized_out>
translating interpreted frame add => bytecode_offset=0, height=8
0x7ffee7bee240: [top + 72] <- 0x08d9c6b81521 <JSGlobal Object> ; stack parameter (input #1)
0x7ffee7bee238: [top + 64] <- 0x08d97929da31 <HeapNumber 1.1> ; stack parameter (input #2)
0x7ffee7bee230: [top + 56] <- 0x08d97929da41 <HeapNumber 2.2> ; stack parameter (input #3)
-------------------------
0x7ffee7bee228: [top + 48] <- 0x00010d2881e8 ; caller's pc
0x7ffee7bee220: [top + 40] <- 0x7ffee7bee290 ; caller's fp
0x7ffee7bee218: [top + 32] <- 0x08d979281749 <NativeContext[247]> ; context (input #4)
0x7ffee7bee210: [top + 24] <- 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> ;
function (input #0)
0x7ffee7bee208: [top + 16] <- 0x08d97929dca1 <BytecodeArray[7]> ; bytecode array
0x7ffee7bee200: [top + 8] <- 0x003900000000 <Smi 57> ; bytecode offset
-------------------------
0x7ffee7bee1f8: [top + 0] <- 0x08d92b080e19 <Odd Oddball: optimized_out> ; accumulator
(input #5)
[deoptimizing (eager): end 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> @0 => node=0,
pc=0x00010d2886c0, caller sp=0x7ffee7bee248, took 1.163 ms]
@ryzokuken@ryzokuken117
[deoptimizing (DEOPT eager): begin 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> (opt #0)
@0, FP to SP delta: 24, caller sp: 0x7ffee7bee248]
;;; deoptimize at <add.js:2:12>, not a Smi
reading input frame add => bytecode_offset=0, args=3, height=1, retval=0(#0); inputs:
0: 0x08d97929dbc1 ; [fp - 16] 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)>
1: 0x08d9c6b81521 ; [fp + 32] 0x08d9c6b81521 <JSGlobal Object>
2: 0x08d97929da31 ; rdx 0x08d97929da31 <HeapNumber 1.1>
3: 0x08d97929da41 ; [fp + 16] 0x08d97929da41 <HeapNumber 2.2>
4: 0x08d979281749 ; [fp - 24] 0x08d979281749 <NativeContext[247]>
5: 0x08d92b080e19 ; (literal 2) 0x08d92b080e19 <Odd Oddball: optimized_out>
translating interpreted frame add => bytecode_offset=0, height=8
0x7ffee7bee240: [top + 72] <- 0x08d9c6b81521 <JSGlobal Object> ; stack parameter (input #1)
0x7ffee7bee238: [top + 64] <- 0x08d97929da31 <HeapNumber 1.1> ; stack parameter (input #2)
0x7ffee7bee230: [top + 56] <- 0x08d97929da41 <HeapNumber 2.2> ; stack parameter (input #3)
-------------------------
0x7ffee7bee228: [top + 48] <- 0x00010d2881e8 ; caller's pc
0x7ffee7bee220: [top + 40] <- 0x7ffee7bee290 ; caller's fp
0x7ffee7bee218: [top + 32] <- 0x08d979281749 <NativeContext[247]> ; context (input #4)
0x7ffee7bee210: [top + 24] <- 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> ;
function (input #0)
0x7ffee7bee208: [top + 16] <- 0x08d97929dca1 <BytecodeArray[7]> ; bytecode array
0x7ffee7bee200: [top + 8] <- 0x003900000000 <Smi 57> ; bytecode offset
-------------------------
0x7ffee7bee1f8: [top + 0] <- 0x08d92b080e19 <Odd Oddball: optimized_out> ; accumulator
(input #5)
[deoptimizing (eager): end 0x08d97929dbc1 <JSFunction add (sfi = 0x8d97929d999)> @0 => node=0,
pc=0x00010d2886c0, caller sp=0x7ffee7bee248, took 1.163 ms]
@ryzokuken@ryzokuken118
Pro Tip: If you don’t want your code to be slow,
try to stick to certain types.
It makes things easier.
@ryzokuken
Special Thanks
● Benedikt Meurer (@bmeurer)
● Yang Guo (@hashseed)
● Sathya Gunasekaran (@_gsathya)
● Jakob Gruber (@schuay)
● Sigurd Schneider (@sigurdschn)
● ...and everyone else from the V8 team.
● The organizers.
119
@ryzokuken@ryzokuken
Paldies!
120

More Related Content

What's hot

The Ring programming language version 1.9 book - Part 31 of 210
The Ring programming language version 1.9 book - Part 31 of 210The Ring programming language version 1.9 book - Part 31 of 210
The Ring programming language version 1.9 book - Part 31 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 26 of 189
The Ring programming language version 1.6 book - Part 26 of 189The Ring programming language version 1.6 book - Part 26 of 189
The Ring programming language version 1.6 book - Part 26 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 30 of 185
The Ring programming language version 1.5.4 book - Part 30 of 185The Ring programming language version 1.5.4 book - Part 30 of 185
The Ring programming language version 1.5.4 book - Part 30 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181
Mahmoud Samir Fayed
 
Functional Patterns for the non-mathematician
Functional Patterns for the non-mathematicianFunctional Patterns for the non-mathematician
Functional Patterns for the non-mathematician
Brian Lonsdorf
 
The Ring programming language version 1.5.1 book - Part 43 of 180
The Ring programming language version 1.5.1 book - Part 43 of 180The Ring programming language version 1.5.1 book - Part 43 of 180
The Ring programming language version 1.5.1 book - Part 43 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 23 of 180
The Ring programming language version 1.5.1 book - Part 23 of 180The Ring programming language version 1.5.1 book - Part 23 of 180
The Ring programming language version 1.5.1 book - Part 23 of 180
Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 24 of 181
The Ring programming language version 1.5.2 book - Part 24 of 181The Ring programming language version 1.5.2 book - Part 24 of 181
The Ring programming language version 1.5.2 book - Part 24 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84
Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 21 of 88
The Ring programming language version 1.3 book - Part 21 of 88The Ring programming language version 1.3 book - Part 21 of 88
The Ring programming language version 1.3 book - Part 21 of 88
Mahmoud Samir Fayed
 
New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)
Matthew Turland
 
미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정
SeungChul Kang
 
Millionways
MillionwaysMillionways
Millionways
Brian Lonsdorf
 
The Ring programming language version 1.5.4 book - Part 36 of 185
The Ring programming language version 1.5.4 book - Part 36 of 185The Ring programming language version 1.5.4 book - Part 36 of 185
The Ring programming language version 1.5.4 book - Part 36 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 34 of 180
The Ring programming language version 1.5.1 book - Part 34 of 180The Ring programming language version 1.5.1 book - Part 34 of 180
The Ring programming language version 1.5.1 book - Part 34 of 180
Mahmoud Samir Fayed
 

What's hot (20)

The Ring programming language version 1.9 book - Part 31 of 210
The Ring programming language version 1.9 book - Part 31 of 210The Ring programming language version 1.9 book - Part 31 of 210
The Ring programming language version 1.9 book - Part 31 of 210
 
The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30The Ring programming language version 1.4 book - Part 8 of 30
The Ring programming language version 1.4 book - Part 8 of 30
 
The Ring programming language version 1.6 book - Part 26 of 189
The Ring programming language version 1.6 book - Part 26 of 189The Ring programming language version 1.6 book - Part 26 of 189
The Ring programming language version 1.6 book - Part 26 of 189
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184The Ring programming language version 1.5.3 book - Part 44 of 184
The Ring programming language version 1.5.3 book - Part 44 of 184
 
The Ring programming language version 1.5.4 book - Part 30 of 185
The Ring programming language version 1.5.4 book - Part 30 of 185The Ring programming language version 1.5.4 book - Part 30 of 185
The Ring programming language version 1.5.4 book - Part 30 of 185
 
The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.2 book - Part 29 of 181
 
Functional Patterns for the non-mathematician
Functional Patterns for the non-mathematicianFunctional Patterns for the non-mathematician
Functional Patterns for the non-mathematician
 
The Ring programming language version 1.5.1 book - Part 43 of 180
The Ring programming language version 1.5.1 book - Part 43 of 180The Ring programming language version 1.5.1 book - Part 43 of 180
The Ring programming language version 1.5.1 book - Part 43 of 180
 
The Ring programming language version 1.5.1 book - Part 23 of 180
The Ring programming language version 1.5.1 book - Part 23 of 180The Ring programming language version 1.5.1 book - Part 23 of 180
The Ring programming language version 1.5.1 book - Part 23 of 180
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
 
The Ring programming language version 1.5.2 book - Part 24 of 181
The Ring programming language version 1.5.2 book - Part 24 of 181The Ring programming language version 1.5.2 book - Part 24 of 181
The Ring programming language version 1.5.2 book - Part 24 of 181
 
The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 14 of 84
 
The Ring programming language version 1.3 book - Part 21 of 88
The Ring programming language version 1.3 book - Part 21 of 88The Ring programming language version 1.3 book - Part 21 of 88
The Ring programming language version 1.3 book - Part 21 of 88
 
New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)New SPL Features in PHP 5.3 (TEK-X)
New SPL Features in PHP 5.3 (TEK-X)
 
미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정
 
Millionways
MillionwaysMillionways
Millionways
 
The Ring programming language version 1.5.4 book - Part 36 of 185
The Ring programming language version 1.5.4 book - Part 36 of 185The Ring programming language version 1.5.4 book - Part 36 of 185
The Ring programming language version 1.5.4 book - Part 36 of 185
 
The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84The Ring programming language version 1.2 book - Part 19 of 84
The Ring programming language version 1.2 book - Part 19 of 84
 
The Ring programming language version 1.5.1 book - Part 34 of 180
The Ring programming language version 1.5.1 book - Part 34 of 180The Ring programming language version 1.5.1 book - Part 34 of 180
The Ring programming language version 1.5.1 book - Part 34 of 180
 

Similar to V8 by example: A journey through the compilation pipeline by Ujjwas Sharma at FrontCon 2019

The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 37 of 196
The Ring programming language version 1.7 book - Part 37 of 196The Ring programming language version 1.7 book - Part 37 of 196
The Ring programming language version 1.7 book - Part 37 of 196
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 43 of 212
The Ring programming language version 1.10 book - Part 43 of 212The Ring programming language version 1.10 book - Part 43 of 212
The Ring programming language version 1.10 book - Part 43 of 212
Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212
Mahmoud Samir Fayed
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
GeeksLab Odessa
 
The Ring programming language version 1.7 book - Part 41 of 196
The Ring programming language version 1.7 book - Part 41 of 196The Ring programming language version 1.7 book - Part 41 of 196
The Ring programming language version 1.7 book - Part 41 of 196
Mahmoud Samir Fayed
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
priort
 
The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189
Mahmoud Samir Fayed
 
Swift 함수 커링 사용하기
Swift 함수 커링 사용하기Swift 함수 커링 사용하기
Swift 함수 커링 사용하기
진성 오
 
The Ring programming language version 1.3 book - Part 16 of 88
The Ring programming language version 1.3 book - Part 16 of 88The Ring programming language version 1.3 book - Part 16 of 88
The Ring programming language version 1.3 book - Part 16 of 88
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
Mahmoud Samir Fayed
 
JavaScript ∩ WebAssembly
JavaScript ∩ WebAssemblyJavaScript ∩ WebAssembly
JavaScript ∩ WebAssembly
Tadeu Zagallo
 
The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210
Mahmoud Samir Fayed
 
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
Mahmoud Samir Fayed
 
On Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data TypesOn Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data Types
Jonathan Katz
 
Monadologie
MonadologieMonadologie
Monadologie
league
 
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
JaeYeoul Ahn
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
Jaehue Jang
 

Similar to V8 by example: A journey through the compilation pipeline by Ujjwas Sharma at FrontCon 2019 (20)

The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185The Ring programming language version 1.5.4 book - Part 25 of 185
The Ring programming language version 1.5.4 book - Part 25 of 185
 
The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196The Ring programming language version 1.7 book - Part 28 of 196
The Ring programming language version 1.7 book - Part 28 of 196
 
The Ring programming language version 1.7 book - Part 37 of 196
The Ring programming language version 1.7 book - Part 37 of 196The Ring programming language version 1.7 book - Part 37 of 196
The Ring programming language version 1.7 book - Part 37 of 196
 
The Ring programming language version 1.10 book - Part 43 of 212
The Ring programming language version 1.10 book - Part 43 of 212The Ring programming language version 1.10 book - Part 43 of 212
The Ring programming language version 1.10 book - Part 43 of 212
 
The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212The Ring programming language version 1.10 book - Part 40 of 212
The Ring programming language version 1.10 book - Part 40 of 212
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
The Ring programming language version 1.7 book - Part 41 of 196
The Ring programming language version 1.7 book - Part 41 of 196The Ring programming language version 1.7 book - Part 41 of 196
The Ring programming language version 1.7 book - Part 41 of 196
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
 
Xm lparsers
Xm lparsersXm lparsers
Xm lparsers
 
The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189The Ring programming language version 1.6 book - Part 32 of 189
The Ring programming language version 1.6 book - Part 32 of 189
 
Swift 함수 커링 사용하기
Swift 함수 커링 사용하기Swift 함수 커링 사용하기
Swift 함수 커링 사용하기
 
The Ring programming language version 1.3 book - Part 16 of 88
The Ring programming language version 1.3 book - Part 16 of 88The Ring programming language version 1.3 book - Part 16 of 88
The Ring programming language version 1.3 book - Part 16 of 88
 
The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184The Ring programming language version 1.5.3 book - Part 54 of 184
The Ring programming language version 1.5.3 book - Part 54 of 184
 
JavaScript ∩ WebAssembly
JavaScript ∩ WebAssemblyJavaScript ∩ WebAssembly
JavaScript ∩ WebAssembly
 
The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210The Ring programming language version 1.9 book - Part 38 of 210
The Ring programming language version 1.9 book - Part 38 of 210
 
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
 
On Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data TypesOn Beyond (PostgreSQL) Data Types
On Beyond (PostgreSQL) Data Types
 
Monadologie
MonadologieMonadologie
Monadologie
 
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
Go 프로그래밍 소개 - 장재휴, DomainDriven커뮤니티
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 

More from DevClub_lv

Fine-tuning Large Language Models by Dmitry Balabka
Fine-tuning Large Language Models by Dmitry BalabkaFine-tuning Large Language Models by Dmitry Balabka
Fine-tuning Large Language Models by Dmitry Balabka
DevClub_lv
 
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ..."Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
DevClub_lv
 
From 50 to 500 product engineers – data-driven approach to building impactful...
From 50 to 500 product engineers – data-driven approach to building impactful...From 50 to 500 product engineers – data-driven approach to building impactful...
From 50 to 500 product engineers – data-driven approach to building impactful...
DevClub_lv
 
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
DevClub_lv
 
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
DevClub_lv
 
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
DevClub_lv
 
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
DevClub_lv
 
SRE (service reliability engineer) on big DevOps platform running on the clou...
SRE (service reliability engineer) on big DevOps platform running on the clou...SRE (service reliability engineer) on big DevOps platform running on the clou...
SRE (service reliability engineer) on big DevOps platform running on the clou...
DevClub_lv
 
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
DevClub_lv
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
DevClub_lv
 
Building resilient frontend architecture by Monica Lent at FrontCon 2019
Building resilient frontend architecture by Monica Lent at FrontCon 2019Building resilient frontend architecture by Monica Lent at FrontCon 2019
Building resilient frontend architecture by Monica Lent at FrontCon 2019
DevClub_lv
 
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
Things that every JavaScript developer should know by Rachel Appel at FrontCo...Things that every JavaScript developer should know by Rachel Appel at FrontCo...
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
DevClub_lv
 
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
DevClub_lv
 
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
DevClub_lv
 
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
Bridging the gap between UX and development - A Storybook by Marko Letic at F...Bridging the gap between UX and development - A Storybook by Marko Letic at F...
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
DevClub_lv
 
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
DevClub_lv
 
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
DevClub_lv
 
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
DevClub_lv
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
DevClub_lv
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
DevClub_lv
 

More from DevClub_lv (20)

Fine-tuning Large Language Models by Dmitry Balabka
Fine-tuning Large Language Models by Dmitry BalabkaFine-tuning Large Language Models by Dmitry Balabka
Fine-tuning Large Language Models by Dmitry Balabka
 
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ..."Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
"Infrastructure and AWS at Scale: The story of Posti" by Goran Gjorgievski @ ...
 
From 50 to 500 product engineers – data-driven approach to building impactful...
From 50 to 500 product engineers – data-driven approach to building impactful...From 50 to 500 product engineers – data-driven approach to building impactful...
From 50 to 500 product engineers – data-driven approach to building impactful...
 
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
Why is it so complex to accept a payment? by Dmitry Buzdin from A-Heads Consu...
 
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
Do we need DDD? by Jurijs Čudnovskis from “Craftsmans Passion” at Fintech foc...
 
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
Network security with Azure PaaS services by Erwin Staal from 4DotNet at Azur...
 
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
Using Azure Managed Identities for your App Services by Jan de Vries from 4Do...
 
SRE (service reliability engineer) on big DevOps platform running on the clou...
SRE (service reliability engineer) on big DevOps platform running on the clou...SRE (service reliability engineer) on big DevOps platform running on the clou...
SRE (service reliability engineer) on big DevOps platform running on the clou...
 
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
Emergence of IOT & Cloud – Azure by Narendra Sharma at Cloud focused 76th Dev...
 
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
Cross Platform Mobile Development using Flutter by Wei Meng Lee at Mobile foc...
 
Building resilient frontend architecture by Monica Lent at FrontCon 2019
Building resilient frontend architecture by Monica Lent at FrontCon 2019Building resilient frontend architecture by Monica Lent at FrontCon 2019
Building resilient frontend architecture by Monica Lent at FrontCon 2019
 
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
Things that every JavaScript developer should know by Rachel Appel at FrontCo...Things that every JavaScript developer should know by Rachel Appel at FrontCo...
Things that every JavaScript developer should know by Rachel Appel at FrontCo...
 
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
 
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
Software Decision Making in Terms of Uncertainty by Ziv Levy at FrontCon 2019
 
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
Bridging the gap between UX and development - A Storybook by Marko Letic at F...Bridging the gap between UX and development - A Storybook by Marko Letic at F...
Bridging the gap between UX and development - A Storybook by Marko Letic at F...
 
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
Case-study: Frontend in Cybersecurity by Ruslan Zavacky by FrontCon 2019
 
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
Building next generation PWA e-commerce frontend by Raivis Dejus at FrontCon ...
 
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
Parcel – your next web application bundler? by Janis Koselevs at FrontCon 2019
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 

Recently uploaded

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

V8 by example: A journey through the compilation pipeline by Ujjwas Sharma at FrontCon 2019

Editor's Notes

  1. V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chormium, the open source browser from Google and it’s derivatives, and in Node.js, among others.
  2. Here we explicitly warm up the x+y site with SignedSmall feedback by passing in two integer values whose sum also fits into the small integer range. Then we tell V8 that it should optimize the function add (with TurboFan) when it’s called the next time, and eventually we call add, which triggers TurboFan and then runs the generated machine code.
  3. The prologue checks whether the code object is still valid or whether some condition changed which requires us to throw away the code object. Once we know that the code is still valid, we build the stack frame and check that there’s enough space left on the stack to execute the code.
  4. Then we start with the body of the function. We load the values of the parameters x and y from the stack (relative to the frame pointer in rbp) and check if both values have Smi representation (since feedback for + says that both inputs have always been Smi so far). This is done by testing the least significant bit. Once we know that they are both represented as Smi, we need to convert them to 32-bit representation, which is done by shifting the value by 32 bit to the right. If either x or y is not a Smi the execution of the optimized code aborts immediately and the deoptimizer restores the state of the function in the interpreter right before the Add.
  5. Then we go on to perform the integer addition on the inputs. We need to test explicitly for overflow, since the result of the addition might be outside the range of 32-bit integers, in which case we’d need to go back to the interpreter, which will then learn Number feedback on the Add. Finally we convert the result back to Smi representation by shifting the signed 32-bit value up by 32 bit, and then we return the value in the accumulator register rax.
  6. As said before, this is not yet the perfect code for this case, since here it would be beneficial to just perform the addition on Smi representation directly, instead of going to Word32, which would save us three shift instructions. But even putting aside this minor aspect, you can see that the generated code is highly optimized and specialized to the profiling feedback. It doesn’t even try to deal with other numbers, strings, big ints or arbitrary JavaScript objects here, but focuses only on the kind of values we’ve seen so far. This is the key ingredient to peak performance for many JavaScript applications.