Skip to content

Add set_variable_value to opfunc_native_call #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions jerry-core/vm/opcodes-native-call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ ecma_completion_value_t
opfunc_native_call (opcode_t opdata, /**< operation data */
int_data_t *int_data) /**< interpreter context */
{
// const idx_t dst_var_idx = opdata.data.native_call.lhs;
const idx_t dst_var_idx = opdata.data.native_call.lhs;
const idx_t native_call_id_idx = opdata.data.native_call.name;
const idx_t args_number = opdata.data.native_call.arg_list;
const opcode_counter_t lit_oc = int_data->pos;

JERRY_ASSERT (native_call_id_idx < OPCODE_NATIVE_CALL__COUNT);

Expand Down Expand Up @@ -106,7 +107,8 @@ opfunc_native_call (opcode_t opdata, /**< operation data */

mem_heap_free_block (zt_str_p);

ret_value = ecma_make_empty_completion_value ();
ret_value = set_variable_value (int_data, lit_oc, dst_var_idx,
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));

ECMA_FINALIZE (str_value);
}
Expand Down
16 changes: 16 additions & 0 deletions tests/jerry/regression-test-issue-117.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2015 Samsung Electronics Co., Ltd.
// Copyright 2015 University of Szeged.
//
// 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.

[print(typeof v_1)];