SlideShare ist ein Scribd-Unternehmen logo
1 von 32
.NET Internals
stack memory management
Compilation flow
var hello = "Hello";
var world = "World";
Console.WriteLine(hello + world);
ldstr "Hello"
ldstr "World"
call System.String::Concat
call System.Console::WriteLine
movabs rdi, 0x196af5078
mov rdi, qword ptr [rdi]
movabs rsi, 0x196af5080
mov rsi, qword ptr [rsi]
call 0x10d5ad380
mov rdi, rax
call 0x10dbb1d40
Notation types
• Infix
• Suffix
• Postfix
2 + 3
+ 2 3
2 3 +
Notation types
• Infix
• Suffix
• Postfix
builder.Append("Hello!")
Append builder "Hello!"
builder "Hello!" Append
Stack machine
2 + 3 * 4
Stack machine
2 2
3
4
3
2 2
12
14
2 + 3 * 4
Stack machine
Stack
head
Stack machine
C#
var i = 2 + 2;
2 2 + i;
Forth
Developer Forth was Yoda just
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
C#
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
CIL
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
C# CIL
Stack phone
top
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
C# CIL
Stack phone
phone
top
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
C# CIL
Stack phone
phone
top
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
C# CIL
Stack phone
top
Stack machine
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone);
call Contact GetPhoneNumber()
dup
call void SendMessage(Contact)
call void MakeCall(Contact)
C# CIL
Stack
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
C#
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
CIL
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack 1
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack 1
Locals mode
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
Locals mode
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
mode
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack phone
mode
Locals mode
phone
top
Stack machine
var mode = Mode.Default
var phone = GetPhoneNumber();
SendMessage(phone);
MakeCall(phone, mode);
ldc.i4.1
stloc.0
call Contact GetPhoneNumber()
stloc.1
ldloc.1
call void SendMessage(Contact)
ldloc.1
ldloc.0
call void MakeCall(Contact, valuetype Mode)
C# CIL
Stack Locals mode
phone
top
JIT compiler
Demo
JIT compiler
LdVar Sorting
& Tree
Ordering
Loop
Optimizations
Range Check
Elimination
Rationalization
Importer Inliner Morph
Flowgraph
Analysis
EmitterLowering LSRA CodeGen
Rationalized
LIR
Native
Code
GenTrees IR with reference counts
& evaluation order
Instr
Descs
Real
registers
Reg
Reqts
GenTrees
(IR)
IL
(bytecode)
Copy
Propagation
CSE
Assertion
Propagation
Loop
Optimizations
Range Check
Elimination
Copy
Propagation
CSE
Assertion
Propagation
JIT optimizations
• Not saving variables
• Method call inlining
• Range check elimination
• Jump instead of call
• …
Demo
.NET Internals
stack memory management
Nikolay Balakin
nikolay@balakin.me

Weitere ähnliche Inhalte

Was ist angesagt?

[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...
[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...
[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...CODE BLUE
 
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code styleRuby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code styleAnton Shemerey
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
Rust LDN 24 7 19 Oxidising the Command Line
Rust LDN 24 7 19 Oxidising the Command LineRust LDN 24 7 19 Oxidising the Command Line
Rust LDN 24 7 19 Oxidising the Command LineMatt Provost
 
Learning go for perl programmers
Learning go for perl programmersLearning go for perl programmers
Learning go for perl programmersFred Moyer
 
DConf 2016 std.database (a proposed interface & implementation)
DConf 2016 std.database (a proposed interface & implementation)DConf 2016 std.database (a proposed interface & implementation)
DConf 2016 std.database (a proposed interface & implementation)cruisercoder
 
ClojurianからみたElixir
ClojurianからみたElixirClojurianからみたElixir
ClojurianからみたElixirKent Ohashi
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutesSumit Raj
 

Was ist angesagt? (13)

[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...
[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...
[CB20] Reflex: you give me a parser, I give you a token generator by Paolo Mo...
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
Protecting C++
Protecting C++Protecting C++
Protecting C++
 
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code styleRuby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Having Fun Programming!
Having Fun Programming!Having Fun Programming!
Having Fun Programming!
 
Rust LDN 24 7 19 Oxidising the Command Line
Rust LDN 24 7 19 Oxidising the Command LineRust LDN 24 7 19 Oxidising the Command Line
Rust LDN 24 7 19 Oxidising the Command Line
 
Learning go for perl programmers
Learning go for perl programmersLearning go for perl programmers
Learning go for perl programmers
 
iCloud keychain
iCloud keychainiCloud keychain
iCloud keychain
 
DConf 2016 std.database (a proposed interface & implementation)
DConf 2016 std.database (a proposed interface & implementation)DConf 2016 std.database (a proposed interface & implementation)
DConf 2016 std.database (a proposed interface & implementation)
 
ClojurianからみたElixir
ClojurianからみたElixirClojurianからみたElixir
ClojurianからみたElixir
 
An Intro to Python in 30 minutes
An Intro to Python in 30 minutesAn Intro to Python in 30 minutes
An Intro to Python in 30 minutes
 
The Stack and Buffer Overflows
The Stack and Buffer OverflowsThe Stack and Buffer Overflows
The Stack and Buffer Overflows
 

Ähnlich wie .NET Fest 2018. Николай Балакин. .NET Internals: управление памятью в стеке

Common Intermediate Language (.NET) by Example
Common Intermediate Language (.NET) by ExampleCommon Intermediate Language (.NET) by Example
Common Intermediate Language (.NET) by ExampleGanesh Samarthyam
 
Kotlin / Android Update
Kotlin / Android UpdateKotlin / Android Update
Kotlin / Android UpdateGarth Gilmour
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#Bertrand Le Roy
 
[C++ Korea] Effective Modern C++ Study, Item 11 - 13
[C++ Korea] Effective Modern C++ Study, Item 11 - 13[C++ Korea] Effective Modern C++ Study, Item 11 - 13
[C++ Korea] Effective Modern C++ Study, Item 11 - 13Chris Ohk
 
Your codebase sucks! and how to fix it
Your codebase sucks! and how to fix itYour codebase sucks! and how to fix it
Your codebase sucks! and how to fix itLlewellyn Falco
 
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdfscribdsituation719
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesCharles Nutter
 
0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and ProfitRussell Sanford
 
NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016Mikhail Sosonkin
 
A compact bytecode format for JavaScriptCore
A compact bytecode format for JavaScriptCoreA compact bytecode format for JavaScriptCore
A compact bytecode format for JavaScriptCoreTadeu Zagallo
 
C Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer CentreC Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer Centrejatin batra
 
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...Felipe Prado
 
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaCharles Nutter
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsMichael Pirnat
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code DevelopmentPeter Gfader
 
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...Muhammad Ulhaque
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา CC Omputer R Oom
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา CC Omputer R Oom
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา CC Omputer R Oom
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา CC Omputer R Oom
 

Ähnlich wie .NET Fest 2018. Николай Балакин. .NET Internals: управление памятью в стеке (20)

Common Intermediate Language (.NET) by Example
Common Intermediate Language (.NET) by ExampleCommon Intermediate Language (.NET) by Example
Common Intermediate Language (.NET) by Example
 
Kotlin / Android Update
Kotlin / Android UpdateKotlin / Android Update
Kotlin / Android Update
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
[C++ Korea] Effective Modern C++ Study, Item 11 - 13
[C++ Korea] Effective Modern C++ Study, Item 11 - 13[C++ Korea] Effective Modern C++ Study, Item 11 - 13
[C++ Korea] Effective Modern C++ Study, Item 11 - 13
 
Your codebase sucks! and how to fix it
Your codebase sucks! and how to fix itYour codebase sucks! and how to fix it
Your codebase sucks! and how to fix it
 
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf0x01 - Breaking into Linux VMs for Fun and Profit.pdf
0x01 - Breaking into Linux VMs for Fun and Profit.pdf
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for Dummies
 
0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit
 
NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016NYU hacknight, april 6, 2016
NYU hacknight, april 6, 2016
 
A compact bytecode format for JavaScriptCore
A compact bytecode format for JavaScriptCoreA compact bytecode format for JavaScriptCore
A compact bytecode format for JavaScriptCore
 
C Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer CentreC Programming Training in Ambala ! Batra Computer Centre
C Programming Training in Ambala ! Batra Computer Centre
 
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
DEF CON 27 - XILING GONG PETER PI - exploiting qualcom wlan and modem over th...
 
Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible Java
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) Things
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
 
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
ECSE 221 - Introduction to Computer Engineering - Tutorial 1 - Muhammad Ehtas...
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา C
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา C
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา C
 
การเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา Cการเขียนโปรแกรมด้วยภาษา C
การเขียนโปรแกรมด้วยภาษา C
 

Mehr von NETFest

.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NETNETFest
 
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE....NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...NETFest
 
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NETNETFest
 
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистовNETFest
 
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem....NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...NETFest
 
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven DesignNETFest
 
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at WirexNETFest
 
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A....NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...NETFest
 
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixtureNETFest
 
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Анатолий Колесник. Love, Death & F# TestsNETFest
 
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос....NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...NETFest
 
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep diveNETFest
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in productionNETFest
 
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com....NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...NETFest
 
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real....NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...NETFest
 
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystemNETFest
 
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ....NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...NETFest
 
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali....NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...NETFest
 
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NETNETFest
 
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur....NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...NETFest
 

Mehr von NETFest (20)

.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
 
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE....NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
 
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
 
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
 
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem....NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
 
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
 
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
 
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A....NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
 
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
 
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
 
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос....NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
 
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
 
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
 
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com....NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
 
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real....NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
 
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
 
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ....NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
 
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali....NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
 
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
 
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur....NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
 

Kürzlich hochgeladen

Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Kürzlich hochgeladen (20)

Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

.NET Fest 2018. Николай Балакин. .NET Internals: управление памятью в стеке

  • 2. Compilation flow var hello = "Hello"; var world = "World"; Console.WriteLine(hello + world); ldstr "Hello" ldstr "World" call System.String::Concat call System.Console::WriteLine movabs rdi, 0x196af5078 mov rdi, qword ptr [rdi] movabs rsi, 0x196af5080 mov rsi, qword ptr [rsi] call 0x10d5ad380 mov rdi, rax call 0x10dbb1d40
  • 3. Notation types • Infix • Suffix • Postfix 2 + 3 + 2 3 2 3 +
  • 4. Notation types • Infix • Suffix • Postfix builder.Append("Hello!") Append builder "Hello!" builder "Hello!" Append
  • 6. 2 + 3 * 4 Stack machine
  • 7. 2 2 3 4 3 2 2 12 14 2 + 3 * 4 Stack machine Stack head
  • 8. Stack machine C# var i = 2 + 2; 2 2 + i; Forth
  • 10. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); C# call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) CIL
  • 11. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) C# CIL Stack phone top
  • 12. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) C# CIL Stack phone phone top
  • 13. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) C# CIL Stack phone phone top
  • 14. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) C# CIL Stack phone top
  • 15. Stack machine var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone); call Contact GetPhoneNumber() dup call void SendMessage(Contact) call void MakeCall(Contact) C# CIL Stack top
  • 16. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); C# ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) CIL
  • 17. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack 1 top
  • 18. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack 1 Locals mode top
  • 19. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone Locals mode top
  • 20. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone Locals mode phone top
  • 21. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone Locals mode phone top
  • 22. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone Locals mode phone top
  • 23. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone Locals mode phone top
  • 24. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone mode Locals mode phone top
  • 25. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack phone mode Locals mode phone top
  • 26. Stack machine var mode = Mode.Default var phone = GetPhoneNumber(); SendMessage(phone); MakeCall(phone, mode); ldc.i4.1 stloc.0 call Contact GetPhoneNumber() stloc.1 ldloc.1 call void SendMessage(Contact) ldloc.1 ldloc.0 call void MakeCall(Contact, valuetype Mode) C# CIL Stack Locals mode phone top
  • 28. Demo
  • 29. JIT compiler LdVar Sorting & Tree Ordering Loop Optimizations Range Check Elimination Rationalization Importer Inliner Morph Flowgraph Analysis EmitterLowering LSRA CodeGen Rationalized LIR Native Code GenTrees IR with reference counts & evaluation order Instr Descs Real registers Reg Reqts GenTrees (IR) IL (bytecode) Copy Propagation CSE Assertion Propagation Loop Optimizations Range Check Elimination Copy Propagation CSE Assertion Propagation
  • 30. JIT optimizations • Not saving variables • Method call inlining • Range check elimination • Jump instead of call • …
  • 31. Demo
  • 32. .NET Internals stack memory management Nikolay Balakin nikolay@balakin.me