Restoring lost review fixes for pull request #102 (instantiation of Arguments object).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -2383,6 +2383,14 @@ dump_variable_declaration (literal_index_t lit_id)
|
|||||||
serializer_dump_op_meta (create_op_meta_100 (opcode, lit_id));
|
serializer_dump_op_meta (create_op_meta_100 (opcode, lit_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dump template of 'meta' instruction for scope's code flags.
|
||||||
|
*
|
||||||
|
* Note:
|
||||||
|
* the instruction's flags field is written later (see also: rewrite_scope_code_flags).
|
||||||
|
*
|
||||||
|
* @return position of dumped instruction
|
||||||
|
*/
|
||||||
opcode_counter_t
|
opcode_counter_t
|
||||||
dump_scope_code_flags_for_rewrite (void)
|
dump_scope_code_flags_for_rewrite (void)
|
||||||
{
|
{
|
||||||
@@ -2392,19 +2400,27 @@ dump_scope_code_flags_for_rewrite (void)
|
|||||||
serializer_dump_op_meta (create_op_meta_000 (opcode));
|
serializer_dump_op_meta (create_op_meta_000 (opcode));
|
||||||
|
|
||||||
return oc;
|
return oc;
|
||||||
}
|
} /* dump_scope_code_flags_for_rewrite */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write scope's code flags to specified 'meta' instruction template,
|
||||||
|
* dumped earlier (see also: dump_scope_code_flags_for_rewrite).
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
rewrite_scope_code_flags (opcode_counter_t scope_code_flags_oc,
|
rewrite_scope_code_flags (opcode_counter_t scope_code_flags_oc, /**< position of instruction to rewrite */
|
||||||
opcode_scope_code_flags_t scope_flags)
|
opcode_scope_code_flags_t scope_flags) /**< scope's code properties flags set */
|
||||||
{
|
{
|
||||||
JERRY_ASSERT ((idx_t) scope_flags == scope_flags);
|
JERRY_ASSERT ((idx_t) scope_flags == scope_flags);
|
||||||
|
|
||||||
op_meta opm = serializer_get_op_meta (scope_code_flags_oc);
|
op_meta opm = serializer_get_op_meta (scope_code_flags_oc);
|
||||||
JERRY_ASSERT (opm.op.op_idx == OPCODE (meta));
|
JERRY_ASSERT (opm.op.op_idx == OPCODE (meta));
|
||||||
|
JERRY_ASSERT (opm.op.data.meta.type == OPCODE_META_TYPE_SCOPE_CODE_FLAGS);
|
||||||
|
JERRY_ASSERT (opm.op.data.meta.data_1 == INVALID_VALUE);
|
||||||
|
JERRY_ASSERT (opm.op.data.meta.data_2 == INVALID_VALUE);
|
||||||
|
|
||||||
opm.op.data.meta.data_1 = (idx_t) scope_flags;
|
opm.op.data.meta.data_1 = (idx_t) scope_flags;
|
||||||
serializer_rewrite_op_meta (scope_code_flags_oc, opm);
|
serializer_rewrite_op_meta (scope_code_flags_oc, opm);
|
||||||
}
|
} /* rewrite_scope_code_flags */
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_ret (void)
|
dump_ret (void)
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
function f_arg (arguments)
|
||||||
|
{
|
||||||
|
return arguments;
|
||||||
|
}
|
||||||
|
assert (f_arg (1) === 1);
|
||||||
|
|
||||||
function f (a, b, c)
|
function f (a, b, c)
|
||||||
{
|
{
|
||||||
return arguments;
|
return arguments;
|
||||||
|
|||||||
Reference in New Issue
Block a user