Articoli correlati a Writing A Compiler In Go

Ball, Thorsten Writing A Compiler In Go ISBN 13: 9783982016108

Writing A Compiler In Go - Brossura

 
9783982016108: Writing A Compiler In Go

Sinossi

Writing A Compiler In Go - Version 1.2 - Find out more at https://compilerbook.com

This is the sequel to Writing An Interpreter In Go. We're picking up right where we left off and write a compiler and a virtual machine for Monkey.

Runnable and tested code front and center, built from the ground up, step by step — just like before. But this time, we're going to define bytecode, compile Monkey and execute it in our very own virtual machine. It's the next step in Monkey's evolution. It's the sequel to … a programming language.

Writing A Compiler In Go is the sequel to Writing An Interpreter In Go.
It starts right where the first one stopped, with a fully-working, fully-tested Monkey interpreter in hand, connecting both books seamlessly, ready to build a compiler and a virtual machine for Monkey. In this book, we use the codebase (included in the book!) from the first part and extend it. We take the lexer, the parser, the AST, the REPL and the object system and use them to build a new, faster implementation of Monkey, right next to the tree-walking evaluator we built in the first book.

The approach is unchanged, too. Working, tested code is the focus, we build everything from scratch, do baby steps, write tests firsts, use no 3rd-party-libraries and see and understand how all the pieces fit together.It's a continuation in prose and in code. Do you need to read the first part before this one? If you're okay with treating the code from the first book as black box, then no. But that's not what these books are about; they're about opening up black boxes, looking inside and shining a light. You'll have the best understanding of where we're going in this book, if you know where we started.

Learn how to write a compiler and a virtual machine
Our main goal in in this book is to evolve Monkey. We change its architecture and turn it into a bytecode compiler and virtual machine.We'll take the lexer, the parser, the AST and the object system we wrote in the first book and use them to build our own Monkey compiler and virtual machine … from scratch! We'll build them side-by-side so that we'll always have a running system we can steadily evolve.What we end up with is not only much closer to the programming languages we use every day, giving us a better understanding of how they work, but also 3x faster. And that's without explicitly aiming for performance.

Here's what we'll do:

  • We define our own bytecode instructions, specifying their operands and their encoding. Along the way, we also build a mini-disassembler for them.
  • We write a compiler that takes in a Monkey AST and turns it into bytecode by emitting instructions
  • At the same time we build a stack-based virtual machine that executes the bytecode in its main loop
We'll learn a lot about computers, how they work, what machine code and opcodes are, what the stack is and how to work with stack pointers and frame pointers, what it means to define a calling convention, and much more.

We also
  • build a symbol table and a constant pool
  • do stack arithmetic
  • generate jump instructions
  • build frames into our VM to execute functions with local bindings and arguments!
  • add built-in functions to the VM
  • get real closures working in the virtual machine and learn why closure-compilation is so tricky

Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.

Compra usato

Condizioni: buono
Ship within 24hrs. Satisfaction...
Visualizza questo articolo

EUR 64,71 per la spedizione da U.S.A. a Italia

Destinazione, tempi e costi

EUR 11,46 per la spedizione da Regno Unito a Italia

Destinazione, tempi e costi

Risultati della ricerca per Writing A Compiler In Go

Foto dell'editore

Thorsten Ball
Editore: Thorsten Ball, 2018
ISBN 10: 398201610X ISBN 13: 9783982016108
Nuovo Paperback

Da: Revaluation Books, Exeter, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: Brand New. 352 pages. 9.80x7.30x0.60 inches. In Stock. Codice articolo zk398201610X

Contatta il venditore

Compra nuovo

EUR 57,73
Convertire valuta
Spese di spedizione: EUR 11,46
Da: Regno Unito a: Italia
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Ball, Thorsten
Editore: Thorsten Ball (edition ), 2018
ISBN 10: 398201610X ISBN 13: 9783982016108
Antico o usato Paperback

Da: BooksRun, Philadelphia, PA, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: Good. Ship within 24hrs. Satisfaction 100% guaranteed. APO/FPO addresses supported. Codice articolo 398201610X-11-1

Contatta il venditore

Compra usato

EUR 26,16
Convertire valuta
Spese di spedizione: EUR 64,71
Da: U.S.A. a: Italia
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Immagini fornite dal venditore

Ball, Thorsten
Editore: Thorsten Ball, 2018
ISBN 10: 398201610X ISBN 13: 9783982016108
Antico o usato Brossura

Da: Dream Books Co., Denver, CO, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: very_good. Pages are clean with no markings. May show minor signs of wear or cosmetic defects marks, cuts, bends, or scuffs on the cover, spine, pages, or dust jacket. May have remainder marks on edges. Codice articolo DBV.398201610X.VG

Contatta il venditore

Compra usato

EUR 26,42
Convertire valuta
Spese di spedizione: EUR 64,71
Da: U.S.A. a: Italia
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Ball, Thorsten
Editore: Thorsten Ball, 2018
ISBN 10: 398201610X ISBN 13: 9783982016108
Antico o usato Paperback

Da: HPB-Red, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: Good. Connecting readers with great books since 1972! Used textbooks may not include companion materials such as access codes, etc. May have some wear or writing/highlighting. We ship orders daily and Customer Service is our top priority! Codice articolo S_413294882

Contatta il venditore

Compra usato

EUR 24,82
Convertire valuta
Spese di spedizione: EUR 93,19
Da: U.S.A. a: Italia
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Ball, Thorsten
Editore: Thorsten Ball, 2018
ISBN 10: 398201610X ISBN 13: 9783982016108
Antico o usato Brossura

Da: SecondSale, Montgomery, IL, U.S.A.

Valutazione del venditore 4 su 5 stelle 4 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Very Good. Item in very good condition! Textbooks may not include supplemental items i.e. CDs, access codes etc. Codice articolo 00085795137

Contatta il venditore

Compra usato

EUR 221,76
Convertire valuta
Spese di spedizione: EUR 30,20
Da: U.S.A. a: Italia
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello