Files
jerryscript/src/liboptimizer/pretty-printer.h
T
Ilmir Usmanov dc8ab27900 Split parser into parser itself, opcodes dumper and syntax errors checker.
Add internal hash map of literal indexes:
  In this hash map key is pair of block number and literal's unique identifier in the block, and the value is a literal index that unique in the whole program.
  Block is a continues array of opcodes. So, bytecode is splitted into blocks.
  Each block has its own uid counter. To get literal index the interpreter looks up it in the hash map.
  Thus, now JS program is able to have more than 255 identifiers/string literals.
  The first 128 (0-127) uids are reserved for block's uid counter, the other 128 (128-255) are reserved for tmp variables.
2014-12-10 18:31:59 +03:00

31 lines
980 B
C

/* Copyright 2014 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef PRETTY_PRINTER
#define PRETTY_PRINTER
#include "globals.h"
#ifdef JERRY_ENABLE_PP
#include "interpreter.h"
#include "literal.h"
#include "scopes-tree.h"
void pp_opcode (opcode_counter_t, opcode_t, bool);
void pp_op_meta (opcode_counter_t, op_meta, bool);
void pp_literals (const literal *, literal_index_t);
#endif // JERRY_ENABLE_PP
#endif // PRETTY_PRINTER