• Home
  • Raw
  • Download

Lines Matching +full:vm +full:- +full:pointer

1 # High-Level Design
2 ![High-Level Design](img/engines_high_level_design.png)
4VM). Parser performs translation of input ECMAScript application into the byte-code with the speci…
8 …nt parser. The parser converts the JavaScript source code directly into byte-code without building…
12 … The token structure described by structure `lexer_token_t` in `./jerry-core/parser/js/js-lexer.h`.
16-core/parser/js/js-parser-scanner.c`) pre-scans the input string to find certain tokens. For examp…
20 …for parsing JavaScript expressions. It is implemented in `./jerry-core/parser/js/js-parser-expr.c`.
24 …xpression-parser) to parse the constituent expressions. The implementation of Statement parser is …
32 # Byte-code
34-code (CBC) representation. The key focus is reducing memory consumption of the byte-code represen…
50 ## Byte-code Format
52 The memory layout of a byte-code is the following:
54 ![byte-code layout](img/opcode_layout.png)
56 Each byte-code starts with an opcode. The opcode is one byte long for frequent and two byte long fo…
66 …* __relative branch__: An 1-3 byte long offset. The branch argument might also represent the end o…
81 …For example a range between `ident_end` and `literal_end` fields of the byte-code header contains …
90 There are two other sub-groups of identifiers. *Registers* are those identifiers which are stored i…
96 One byte encoding for literals 0 - 254.
102 Two byte encoding for literals 255 - 510.
106 byte[1] = literal_index - 0xff
111 One byte encoding for literals 0 - 127.
117 Two byte encoding for literals 128 - 32767.
130 ## Byte-code Categories
132 Byte-codes can be placed into four main categories.
134 ### Push Byte-codes
136 Byte-codes of this category serve for placing objects onto the stack. As there are many instruction…
140 | byte-code | description |
141 | --------------------- | ----------------------------------------------------- |
150 ### Call Byte-codes
152 The byte-codes of this category perform calls in different ways.
156 | byte-code | description …
157 | --------------------- | -------------------------------------------------------------------------…
167 ### Arithmetic, Logical, Bitwise and Assignment Byte-codes
173 | byte-code | description …
174 | ----------------------- | -----------------------------------------------------------------------…
185 ### Branch Byte-codes
187-codes are used to perform conditional and unconditional jumps in the byte-code. The arguments of …
191 | byte-code | description |
192 | -------------------------- | ----------------------------------------------------------- |
205 The compiled byte-code can be saved into a snapshot, which also can be loaded back for execution. D…
210-code instructions one by one. The function that starts the interpretation is `vm_run` in `./jerry
233 In case of number, string and object the value contains an encoded pointer, and
234 simple value is a pre-defined constant which can be:
246 ![Compressed Pointer](img/ecma_compressed.png)
251 address space of a 32 bit system by passing "--cpointer_32_bit on" to the build
257 The default is 8-byte (double),
258 but the engine supports the 4-byte (single precision) representation by setting JERRY_NUMBER_TYPE_F…
266 …, but can hold numbers and so-called magic ids too. For common character sequences (defined in `./…
270 … used to find unreferenced objects during garbage collection. The `gc-next` pointer of each object…
272 …tp://www.ecma-international.org/ecma-262/5.1/#sec-10.2) are implemented as objects in JerryScript,…
278 * Reference counter - number of hard (non-property) references
279 * Next object pointer for the garbage collector
291 …his limit is defined to 16), a hash map (called [Property Hashmap](#property-hashmap)) is inserted…
299 This hashmap is a must-return type cache, meaning that every property that the object have, can be …
303 Internal properties are special properties that carry meta-information that cannot be accessed by t…
305 * [[Class]] - class (type) of the object (ECMA-defined)
306 * [[Code]] - points where to find bytecode of the function
307 * native code - points where to find the code of a native function
308 * [[PrimitiveValue]] for Boolean - stores the boolean value of a Boolean object
309 * [[PrimitiveValue]] for Number - stores the numeric value of a Number object
313 …ding a property specified by an object and by a property name. The object-name-property layout of …
319 …oes not exist (i.e. LCache is a may-return cache). If the property is not found, it will be search…
323 Collections are array-like data structures, which are optimized to save memory. Actually, a collect…
327 …. The return values are ECMA values (see section [Data Representation](#data-representation)) and …