Replace array of literals with literal storage.

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-06-10 17:28:53 +03:00
parent 340a9ef002
commit 53801e3b41
36 changed files with 460 additions and 1097 deletions
+3 -10
View File
@@ -16,10 +16,10 @@
#ifndef LEXER_H
#define LEXER_H
#include "literal.h"
#include "lit-literal.h"
#define INVALID_VALUE 255
#define INVALID_LITERAL ((uint32_t) -1)
#define INVALID_LITERAL (rcs_cpointer_t::null_cp ())
/* Keywords. */
typedef enum __attr_packed___
@@ -160,7 +160,7 @@ typedef struct
{
locus loc;
token_type type;
literal_index_t uid;
uint16_t uid;
} token;
/**
@@ -175,13 +175,6 @@ token lexer_next_token (void);
void lexer_save_token (token);
token lexer_prev_token (void);
const literal *lexer_get_literals (void);
const ecma_char_t *lexer_get_strings_cache (void);
void lexer_add_keyword_or_numeric_literal_if_not_present (literal);
literal_index_t lexer_get_literals_count (void);
literal lexer_get_literal_by_id (literal_index_t);
literal_index_t lexer_lookup_literal_uid (literal lit);
void lexer_seek (locus);
void lexer_locus_to_line_and_column (locus, size_t *, size_t *);
void lexer_dump_line (size_t);