Add generation of prop_setter.
This commit is contained in:
@@ -41,7 +41,15 @@ const void *
|
||||
deserialize_bytecode (void)
|
||||
{
|
||||
JERRY_ASSERT (STACK_SIZE (bytecode_opcodes) > 0);
|
||||
return bytecode_opcodes.data;
|
||||
return STACK_RAW_DATA (bytecode_opcodes);
|
||||
}
|
||||
|
||||
opcode_t
|
||||
deserialize_opcode (opcode_counter_t oc)
|
||||
{
|
||||
JERRY_ASSERT (STACK_SIZE (bytecode_opcodes) > 0);
|
||||
JERRY_ASSERT (oc < STACK_SIZE (bytecode_opcodes));
|
||||
return STACK_ELEMENT (bytecode_opcodes, oc);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
|
||||
@@ -18,10 +18,12 @@
|
||||
|
||||
#include "globals.h"
|
||||
#include "ecma-globals.h"
|
||||
#include "opcodes.h"
|
||||
|
||||
const ecma_char_t *deserialize_string_by_id (uint8_t);
|
||||
ecma_number_t deserialize_num_by_id (uint8_t);
|
||||
const void *deserialize_bytecode (void);
|
||||
opcode_t deserialize_opcode (opcode_counter_t);
|
||||
uint8_t deserialize_min_temp (void);
|
||||
|
||||
#endif //DESERIALIZER_H
|
||||
|
||||
@@ -430,6 +430,7 @@ pp_opcode (opcode_counter_t oc, opcode_t opcode, bool is_rewrite)
|
||||
TODO (Refine to match new opcodes)
|
||||
CASE_VARG_0_LHS (obj_decl, lhs, "=", "{", "}")
|
||||
CASE_VARG_1_NAME_LHS (prop_getter, lhs, "=", "", obj, "[", prop, "]")
|
||||
CASE_VARG_1_NAME_LHS (prop_setter, obj, "", "[", prop, " ] = ", rhs, "")
|
||||
CASE_THIS (this, lhs, "=", "this")
|
||||
CASE_DOUBLE_ADDRESS (delete_var, lhs, "=", "delete", name)
|
||||
CASE_TRIPLE_ADDRESS (delete_prop, lhs, "= delete", base, ".", name)
|
||||
|
||||
@@ -50,6 +50,13 @@ serializer_dump_opcode (opcode_t opcode)
|
||||
STACK_PUSH (bytecode_opcodes, opcode);
|
||||
}
|
||||
|
||||
void
|
||||
serializer_set_writing_position (opcode_counter_t oc)
|
||||
{
|
||||
JERRY_ASSERT (oc < STACK_SIZE (bytecode_opcodes));
|
||||
STACK_DROP (bytecode_opcodes, STACK_SIZE (bytecode_opcodes) - oc);
|
||||
}
|
||||
|
||||
void
|
||||
serializer_rewrite_opcode (const opcode_counter_t loc, opcode_t opcode)
|
||||
{
|
||||
|
||||
@@ -22,18 +22,13 @@
|
||||
#include "lp-string.h"
|
||||
|
||||
void serializer_init (bool show_opcodes);
|
||||
|
||||
void serializer_dump_strings_and_nums (const lp_string *, uint8_t,
|
||||
const ecma_number_t *, uint8_t);
|
||||
|
||||
void serializer_dump_opcode (opcode_t);
|
||||
|
||||
void serializer_set_writing_position (opcode_counter_t);
|
||||
void serializer_rewrite_opcode (const opcode_counter_t, opcode_t);
|
||||
|
||||
void serializer_print_opcodes (void);
|
||||
|
||||
void serializer_adjust_strings (void);
|
||||
|
||||
void serializer_free (void);
|
||||
|
||||
#endif // SERIALIZER_H
|
||||
|
||||
Reference in New Issue
Block a user