Lines Matching full:bytecode
1 # Rationale for Bytecode
5 This document sets up some context about bytecode design principles and provides rationales for
6 bytecode design in Panda Runtime.
8 ## Bytecode basics
10 Before discussing bytecode per se, let's take a look at an over-simplified picture of a real
26 Here comes the bytecode. Simply said, it is an attempt to build an abstract CPU on top of real
29 commands (or bytecode) and execute them. Of course, this implies additional performance overhead
35 Although bytecode represents some abstraction, it mirrors all the mentioned concepts from the
41 building bytecode. Following sections explain advantages and disadvantages of various approaches.
78 each bytecode instruction, execute it and move to the next one, running more instruction results in
79 more _dispatch overhead_. Which means that the stack-based bytecode is slower by nature.
81 According to our experiment, uncompressed register-based bytecode can be reduced by ~26%
85 Since bytecode interpretation is a required program execution mode for Panda, performance of the
94 According to our research, these tweaks will allow to reduce the size of uncompressed bytecode by
95 ~20% compared to pure register-based bytecode.
99 Panda bytecode has a dedicated register called _accumulator_, which is addressed implicitly
125 To address the risk of producing inefficient bytecode with redundant moves from and to
184 Another important question is how bytecode is supposed to handle various data types. Back to our
204 on the same platform with the same bytecode, we would have to handle both JavaScript-style addition
206 unmaintainable bytecode.
209 **Panda uses statically-typed bytecode**.
211 There may be a concern: Does a statically typed bytecode forbid us to support a dynamically typed
216 There may be another concern: Does a statically-typed bytecode imply statically-typed registers?
223 bytecode verifiers take the responsibility to control this invariant.