{"action":"created","comment":{"url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments/95366360","pull_request_review_id":15674596,"id":95366360,"diff_hunk":"@@ -0,0 +1,941 @@\n+/* Copyright JS Foundation and other contributors, http://js.foundation\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include \"ecma-typedarray-object.h\"\n+#include \"ecma-arraybuffer-object.h\"\n+#include \"ecma-function-object.h\"\n+#include \"ecma-builtin-helpers.h\"\n+#include \"ecma-try-catch-macro.h\"\n+#include \"ecma-objects.h\"\n+#include \"ecma-builtins.h\"\n+#include \"ecma-exceptions.h\"\n+#include \"ecma-gc.h\"\n+#include \"ecma-globals.h\"\n+#include \"ecma-helpers.h\"\n+\n+#ifndef CONFIG_DISABLE_TYPEDARRAY_BUILTIN\n+\n+/** \\addtogroup ecma ECMA\n+ * @{\n+ *\n+ * \\addtogroup ecmatypedarrayobject ECMA %TypedArray% object related routines\n+ * @{\n+ */\n+\n+/**\n+ * Create a TypedArray object by given array_length\n+ *\n+ * See also: ES2015 22.2.1.2.1\n+ *\n+ * @return pointer to the new typedarray object\n+ */\n+static ecma_object_t *\n+ecma_typedarray_create_object_with_length (ecma_length_t array_length, /**< length of the typedarray */\n+                                           ecma_object_t *proto_p, /**< prototype object */\n+                                           uint8_t element_size_shift, /**< the size shift of the element length */\n+                                           lit_magic_string_id_t class_id) /**< class name of the typedarray */\n+{\n+  ecma_length_t byte_length = array_length << element_size_shift;\n+  ecma_object_t *object_p = ecma_create_object (proto_p,\n+                                                sizeof (ecma_extended_object_t),\n+                                                ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n+\n+  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n+  ext_object_p->u.pseudo_array.u1.class_id = class_id;\n+  ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY;\n+  ext_object_p->u.pseudo_array.extra_info = element_size_shift;\n+  ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (ecma_arraybuffer_new_object (byte_length));\n+  ecma_free_value (ext_object_p->u.pseudo_array.u2.arraybuffer);\n+\n+  return object_p;\n+} /* !ecma_typedarray_create_object_with_length */\n+\n+/**\n+ * Create a TypedArray object by given buffer, offset, and array_length\n+ *\n+ * See also: ES2015 22.2.1.5\n+ *\n+ * @return pointer to the new typedarray object\n+ */\n+static ecma_object_t *\n+ecma_typedarray_create_object_with_buffer (ecma_object_t *arraybuffer_p,\n+                                           ecma_length_t byte_offset,\n+                                           ecma_length_t array_length, /**< length of the typedarray */\n+                                           ecma_object_t *proto_p, /**< prototype object */\n+                                           uint8_t element_size_shift, /**< the size shift of the element length */\n+                                           lit_magic_string_id_t class_id) /**< class name of the typedarray */\n+{\n+  ecma_object_t *object_p;\n+  if (byte_offset == 0 && array_length == ecma_arraybuffer_get_length (arraybuffer_p) >> element_size_shift)\n+  {\n+    object_p = ecma_create_object (proto_p,\n+                                   sizeof (ecma_extended_object_t),\n+                                   ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n+\n+    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n+    ext_object_p->u.pseudo_array.u1.class_id = class_id;\n+    ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY;\n+    ext_object_p->u.pseudo_array.extra_info = element_size_shift;\n+    ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (arraybuffer_p);\n+  }\n+  else\n+  {\n+    object_p = ecma_create_object (proto_p,\n+                                   sizeof (ecma_extended_typedarray_object_t),\n+                                   ECMA_OBJECT_TYPE_PSEUDO_ARRAY);\n+\n+    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;\n+    ext_object_p->u.pseudo_array.u1.class_id = class_id;\n+    ext_object_p->u.pseudo_array.type = ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO;\n+    ext_object_p->u.pseudo_array.extra_info = element_size_shift;\n+    ext_object_p->u.pseudo_array.u2.arraybuffer = ecma_make_object_value (arraybuffer_p);\n+\n+    ecma_extended_typedarray_object_t *typedarray_info_p = (ecma_extended_typedarray_object_t *) ext_object_p;\n+    typedarray_info_p->array_length = array_length;\n+    typedarray_info_p->byte_offset = byte_offset;\n+  }\n+\n+  return object_p;\n+} /* ecma_typedarray_create_object_with_buffer */\n+\n+/**\n+ * Create a TypedArray object by given another TypedArray object\n+ *\n+ * See also: ES2015 22.2.1.3\n+ *\n+ * @return pointer to the new typedarray object\n+ */\n+static ecma_object_t *\n+ecma_typedarray_create_object_with_typedarray (ecma_object_t *typedarray_p, /**< a typedarray object */\n+                                               ecma_object_t *proto_p, /**< prototype object */\n+                                               uint8_t element_size_shift, /**< the size shift of the element length */\n+                                               lit_magic_string_id_t class_id) /**< class name of the typedarray */\n+{\n+  ecma_length_t array_length = ecma_typedarray_get_length (typedarray_p);\n+  ecma_length_t byte_offset = ecma_typedarray_get_offset (typedarray_p);\n+  ecma_object_t *src_arraybuffer_p = ecma_typedarray_get_arraybuffer (typedarray_p);\n+  lit_magic_string_id_t src_class_id = ecma_object_get_class_name (typedarray_p);\n+  ecma_object_t *arraybuffer_p = NULL;\n+\n+  if (src_class_id == class_id)\n+  {\n+    arraybuffer_p = ecma_arraybuffer_new_object_by_clone_arraybuffer (src_arraybuffer_p,\n+                                                                      byte_offset);\n+  }\n+  else\n+  {\n+    ecma_length_t byte_length = array_length << element_size_shift;\n+    arraybuffer_p = ecma_arraybuffer_new_object (byte_length);\n+    lit_utf8_byte_t *src_buf = ecma_arraybuffer_get_buffer (src_arraybuffer_p);\n+    lit_utf8_byte_t *dst_buf = ecma_arraybuffer_get_buffer (arraybuffer_p);\n+    uint8_t src_element_size_shift = ecma_typedarray_get_element_size_shift (arraybuffer_p);\n+    double tmp;\n+    for (uint32_t i = 0; i < array_length; i++)\n+    {\n+#define GET_VALUE_FROM_ARRAYBUFFER(type) \\\n+  type v = *((type *) src_buf); \\\n+  tmp = (double) v;\n+\n+#define SET_VALUE_TO_ARRAYBUFFER(type) \\\n+  type v = (type) tmp; \\\n+  *((type *) dst_buf) = v;\n+\n+      /** check src type and get value from src typedarray */\n+      switch (ecma_object_get_class_name (typedarray_p))\n+      {\n+        case LIT_MAGIC_STRING_INT8_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (int8_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT8_ARRAY_UL:\n+        case LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (uint8_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_INT16_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (int16_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT16_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (uint16_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_INT32_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (int32_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT32_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (uint32_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_FLOAT32_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (float);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_FLOAT64_ARRAY_UL:\n+        {\n+          GET_VALUE_FROM_ARRAYBUFFER (double);\n+          break;\n+        }\n+        default:\n+        {\n+          JERRY_UNREACHABLE ();\n+        }\n+      }\n+      /** check dst type and set value to dst typedarray */\n+      switch (class_id)\n+      {\n+        case LIT_MAGIC_STRING_INT8_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (int8_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT8_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (uint8_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL:\n+        {\n+          uint8_t value;\n+\n+          if (tmp >= 255)\n+          {\n+            value = 255;\n+          }\n+          else if (tmp <= 0)\n+          {\n+            value = 0;\n+          }\n+          else\n+          {\n+            value = (uint8_t) tmp;\n+\n+            if (value + 0.5 < tmp\n+                || (value + 0.5 == tmp && value % 2 == 1))\n+            {\n+              value ++;\n+            }\n+          }\n+          *((uint8_t *) dst_buf) = value;\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_INT16_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (int16_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT16_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (uint16_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_INT32_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (int32_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_UINT32_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (uint32_t);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_FLOAT32_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (float);\n+          break;\n+        }\n+        case LIT_MAGIC_STRING_FLOAT64_ARRAY_UL:\n+        {\n+          SET_VALUE_TO_ARRAYBUFFER (double);\n+          break;\n+        }\n+        default:\n+        {\n+          JERRY_UNREACHABLE ();\n+        }\n+      }\n+\n+      src_buf = src_buf + (1 << src_element_size_shift);\n+      dst_buf = dst_buf + (1 << element_size_shift);\n+    }\n+  }\n+\n+  ecma_object_t *object_p = ecma_typedarray_create_object_with_buffer (arraybuffer_p,\n+                                                                       0,\n+                                                                       array_length,\n+                                                                       proto_p,\n+                                                                       element_size_shift,\n+                                                                       class_id);\n+\n+  ecma_deref_object (arraybuffer_p);\n+\n+  return object_p;\n+} /* ecma_typedarray_create_object_with_typedarray */\n+\n+/**\n+ * Create a TypedArray object by transforming from an array-like object\n+ *\n+ * See also: ES2015 22.2.2.1\n+ *\n+ * @return ecma value\n+ *         Returned value must be freed with ecma_free_value\n+ */\n+ecma_value_t\n+ecma_op_typedarray_from (ecma_value_t items_val, /**< the source array-like object */\n+                         ecma_value_t map_fn_val, /**< map function */\n+                         ecma_value_t this_val, /** this_arg for the above map function */\n+                         ecma_object_t *proto_p, /**< prototype object */\n+                         uint8_t element_size_shift, /**< the size shift of the element length */\n+                         lit_magic_string_id_t class_id) /**< class name of the typedarray */\n+{\n+  ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);\n+\n+  /* 3 */\n+  JERRY_ASSERT (ecma_op_is_callable (map_fn_val) || ecma_is_value_undefined (map_fn_val));\n+\n+  ecma_object_t *func_object_p = NULL;\n+  if (!ecma_is_value_undefined (map_fn_val))\n+  {\n+    func_object_p = ecma_get_object_from_value (map_fn_val);\n+  }\n+\n+  /* 10 */\n+  ECMA_TRY_CATCH (arraylike_val,\n+                  ecma_op_to_object (items_val),\n+                  ret_value);\n+\n+  ecma_object_t *arraylike_p = ecma_get_object_from_value (arraylike_val);\n+\n+  /* 12 */\n+  ecma_string_t *magic_string_length_p = ecma_new_ecma_length_string ();\n+\n+  ECMA_TRY_CATCH (len_value,\n+                  ecma_op_object_get (arraylike_p, magic_string_length_p),\n+                  ret_value);\n+\n+  ECMA_OP_TO_NUMBER_TRY_CATCH (len_number, len_value, ret_value);\n+\n+  uint32_t len = ecma_number_to_uint32 (len_number);\n+\n+  /* 14 */\n+  ecma_object_t *new_typedarray_p = ecma_typedarray_create_object_with_length (len,\n+                                                                               proto_p,\n+                                                                               element_size_shift,\n+                                                                               class_id);\n+\n+  /* 17 */\n+  ecma_value_t current_index;\n+\n+  for (uint32_t index = 0; index < len && ecma_is_value_empty (ret_value); index++)\n+  {\n+    /* 17.a */\n+    ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (index);\n+\n+    /* 17.b */\n+    ECMA_TRY_CATCH (current_value, ecma_op_object_find (arraylike_p, index_str_p), ret_value);\n+\n+    if (ecma_is_value_found (current_value))\n+    {\n+      if (func_object_p)\n+      {\n+        /* 17.d 17.f*/\n+        current_index = ecma_make_uint32_value (index);\n+        ecma_value_t call_args[] = { current_value, current_index};\n+\n+        ECMA_TRY_CATCH (mapped_value, ecma_op_function_call (func_object_p, this_val, call_args, 2), ret_value);\n+\n+        bool set_status = ecma_op_typedarray_set_index_prop (new_typedarray_p, index, mapped_value);\n+\n+        if (!set_status)\n+        {\n+          ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));;\n+        }\n+\n+        ECMA_FINALIZE (mapped_value);\n+      }\n+      else\n+      {\n+        /* 17.e 17.f */\n+        bool set_status = ecma_op_typedarray_set_index_prop (new_typedarray_p, index, current_value);\n+\n+        if (!set_status)\n+        {\n+          ret_value = ecma_raise_type_error (ECMA_ERR_MSG (\"Invalid argument type.\"));;\n+        }\n+      }\n+    }\n+\n+    ECMA_FINALIZE (current_value);\n+\n+    ecma_deref_ecma_string (index_str_p);\n+  }\n+\n+  if (ecma_is_value_empty (ret_value))\n+  {\n+    ret_value = ecma_make_object_value (new_typedarray_p);\n+  }\n+  else\n+  {\n+    ecma_deref_object (new_typedarray_p);\n+  }\n+\n+  ECMA_OP_TO_NUMBER_FINALIZE (len_number);\n+  ECMA_FINALIZE (len_value);\n+  ecma_deref_ecma_string (magic_string_length_p);\n+  ECMA_FINALIZE (arraylike_val);\n+\n+  return ret_value;\n+} /* ecma_op_typedarray_from */\n+\n+/**\n+ * Get the array length of the typedarray object\n+ *\n+ * @return the pointer to the internal arraybuffer\n+ */\n+ecma_object_t *\n+ecma_typedarray_get_arraybuffer (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (typedarray_p)));\n+\n+  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n+\n+  return ecma_get_object_from_value (ext_object_p->u.pseudo_array.u2.arraybuffer);\n+} /* ecma_typedarray_get_arraybuffer */\n+\n+/**\n+ * Get the element size shift in the typedarray object\n+ *\n+ * @return the size shift of the element, size is 1 << shift\n+ */\n+uint8_t\n+ecma_typedarray_get_element_size_shift (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (typedarray_p)));\n+\n+  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n+\n+  return ext_object_p->u.pseudo_array.extra_info;\n+} /* ecma_typedarray_get_element_size_shift */\n+\n+\n+/**\n+ * Get the array length of the typedarray object\n+ *\n+ * @return the array length\n+ */\n+ecma_length_t\n+ecma_typedarray_get_length (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (typedarray_p)));\n+\n+  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n+\n+  if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n+  {\n+    ecma_object_t *arraybuffer_p = ecma_get_object_from_value (ext_object_p->u.pseudo_array.u2.arraybuffer);\n+    ecma_length_t buffer_length = ecma_arraybuffer_get_length (arraybuffer_p);\n+    uint8_t shift = ext_object_p->u.pseudo_array.extra_info;\n+\n+    return buffer_length >> shift;\n+  }\n+  else\n+  {\n+    ecma_extended_typedarray_object_t *info_p = (ecma_extended_typedarray_object_t *) ext_object_p;\n+\n+    return info_p->array_length;\n+  }\n+} /* ecma_typedarray_get_length */\n+\n+/**\n+ * Get the offset of the internal arraybuffer\n+ *\n+ * @return the offset\n+ */\n+ecma_length_t\n+ecma_typedarray_get_offset (ecma_object_t *typedarray_p) /**< the pointer to the typedarray object */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (typedarray_p)));\n+\n+  ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) typedarray_p;\n+\n+  if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n+  {\n+    return 0;\n+  }\n+  else\n+  {\n+    ecma_extended_typedarray_object_t *info_p = (ecma_extended_typedarray_object_t *) ext_object_p;\n+\n+    return info_p->byte_offset;\n+  }\n+} /* ecma_typedarray_get_offset */\n+\n+\n+/**\n+ * Create a new typedarray object.\n+ *\n+ * The struct of the typedarray object\n+ *   ecma_object_t\n+ *   extend_part\n+ *   typedarray_info\n+ *\n+ * @return ecma value\n+ *         Returned value must be freed with ecma_free_value\n+ */\n+ecma_value_t\n+ecma_op_create_typedarray (const ecma_value_t *arguments_list_p, /**< the arg list passed to typedarray construct */\n+                           ecma_length_t arguments_list_len, /**< the length of the arguments_list_p */\n+                           ecma_object_t *proto_p, /**< prototype object */\n+                           uint8_t element_size_shift, /**< the size shift of the element length */\n+                           lit_magic_string_id_t class_id) /**< class name of the typedarray */\n+{\n+  JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);\n+\n+  ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);\n+\n+\n+  if (arguments_list_len == 0)\n+  {\n+    /* 22.2.1.1 */\n+    ret = ecma_make_object_value (ecma_typedarray_create_object_with_length (0, proto_p, element_size_shift, class_id));\n+  }\n+  else if (!ecma_is_value_object (arguments_list_p[0]))\n+  {\n+    /* 22.2.1.2 */\n+    if (ecma_is_value_undefined (arguments_list_p[0]))\n+    {\n+      return ecma_raise_type_error (ECMA_ERR_MSG (\"length argument is undefined\"));\n+    }\n+\n+    ECMA_OP_TO_NUMBER_TRY_CATCH (num, arguments_list_p[0], ret);\n+\n+    uint32_t length = ecma_number_to_uint32 (num);\n+\n+    if (num != ((ecma_number_t) length))\n+    {\n+      return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid typedarray length.\"));\n+    }\n+\n+    ret = ecma_make_object_value (ecma_typedarray_create_object_with_length (length,\n+                                                                             proto_p,\n+                                                                             element_size_shift,\n+                                                                             class_id));\n+\n+    ECMA_OP_TO_NUMBER_FINALIZE (num);\n+  }\n+  else if (ecma_is_value_object (arguments_list_p[0]))\n+  {\n+    if (ecma_is_typedarray (arguments_list_p[0]))\n+    {\n+      /* 22.2.1.3 */\n+      ecma_object_t *typedarray_p = ecma_get_object_from_value (arguments_list_p[0]);\n+      ret = ecma_make_object_value (ecma_typedarray_create_object_with_typedarray (typedarray_p,\n+                                                                                   proto_p,\n+                                                                                   element_size_shift,\n+                                                                                   class_id));\n+    }\n+    else if (ecma_is_arraybuffer (arguments_list_p[0]))\n+    {\n+      /* 22.2.1.5 */\n+      ecma_object_t *arraybuffer_p = ecma_get_object_from_value (arguments_list_p[0]);\n+      ecma_value_t arg2 = ((arguments_list_len > 1) ? arguments_list_p[1]\n+                                                    : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));\n+\n+      ecma_value_t arg3 = ((arguments_list_len > 2) ? arguments_list_p[2]\n+                                                    : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));\n+\n+      ECMA_OP_TO_NUMBER_TRY_CATCH (num2, arg2, ret);\n+\n+      uint32_t offset = ecma_number_to_uint32 (num2);\n+\n+      if (ecma_number_is_negative (ecma_number_to_int32 (num2)) || (offset % (uint32_t) (1 << element_size_shift) != 0))\n+      {\n+        return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid offset.\"));\n+      }\n+\n+      ecma_length_t buf_byte_length = ecma_arraybuffer_get_length (arraybuffer_p);\n+      ecma_length_t new_byte_length;\n+\n+      if (ecma_is_value_undefined (arg3))\n+      {\n+        if (buf_byte_length % (uint32_t) (1 << element_size_shift) != 0)\n+        {\n+          return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n+        }\n+\n+        if (buf_byte_length < offset)\n+        {\n+          return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n+        }\n+\n+        new_byte_length = (ecma_length_t) (buf_byte_length - offset);\n+      }\n+      else\n+      {\n+        ECMA_OP_TO_NUMBER_TRY_CATCH (num3, arg3, ret);\n+        int32_t new_length = ecma_number_to_int32 (num3);\n+        new_length = (new_length > 0) ? new_length : 0;\n+        new_byte_length = (ecma_length_t) new_length << element_size_shift;\n+\n+        if (new_byte_length + offset > buf_byte_length)\n+        {\n+          return ecma_raise_range_error (ECMA_ERR_MSG (\"Invalid length.\"));\n+        }\n+\n+        ECMA_OP_TO_NUMBER_FINALIZE (num3);\n+\n+        if (!ecma_is_value_empty (ret))\n+        {\n+          return ret;\n+        }\n+      }\n+\n+      ret = ecma_make_object_value (ecma_typedarray_create_object_with_buffer (arraybuffer_p,\n+                                                                               offset,\n+                                                                               new_byte_length >> element_size_shift,\n+                                                                               proto_p,\n+                                                                               element_size_shift,\n+                                                                               class_id));\n+\n+      ECMA_OP_TO_NUMBER_FINALIZE (num2);\n+    }\n+    else\n+    {\n+      /* 22.2.1.4 */\n+      ecma_value_t undef_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);\n+      ret = ecma_op_typedarray_from (arguments_list_p[0],\n+                                     undef_val,\n+                                     undef_val,\n+                                     proto_p,\n+                                     element_size_shift,\n+                                     class_id);\n+    }\n+  }\n+\n+  return ret;\n+} /* ecma_op_create_typedarray */\n+\n+/**\n+ * Check if the value is typedarray\n+ *\n+ * @return True: it is a typedarray object\n+ *         False: it is not object or it is not a typedarray\n+ */\n+bool\n+ecma_is_typedarray (ecma_value_t target) /**< the target need to be checked */\n+{\n+  if (!ecma_is_value_object (target))\n+  {\n+    return false;\n+  }\n+\n+  ecma_object_t *obj_p = ecma_get_object_from_value (target);\n+\n+  if (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)\n+  {\n+    ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;\n+\n+    return ((ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY)\n+            || (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO));\n+  }\n+\n+  return false;\n+} /* ecma_is_typedarray */\n+\n+/**\n+ * List names of a TypedArray object's integer indexed properties\n+ *\n+ * @return void\n+ */\n+void\n+ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedArray object */\n+                                             ecma_collection_header_t *main_collection_p) /**< 'main'\n+                                                                                           *   collection */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (obj_p)));\n+\n+  ecma_length_t array_length = ecma_typedarray_get_length (obj_p);\n+\n+  for (ecma_length_t i = 0; i < array_length; i++)\n+  {\n+    ecma_string_t *name_p = ecma_new_ecma_string_from_uint32 (i);\n+\n+    ecma_append_to_values_collection (main_collection_p, ecma_make_string_value (name_p), true);\n+\n+    ecma_deref_ecma_string (name_p);\n+  }\n+} /* ecma_op_typedarray_list_lazy_property_names */\n+\n+/**\n+ * Get the integer number property value of the typedarray\n+ *\n+ * See also: ES2015 9.4.5.8\n+ *\n+ * @return ecma value\n+ *         if failed, return undefined value\n+ */\n+ecma_value_t\n+ecma_op_typedarray_get_index_prop (ecma_object_t *obj_p, /**< a TypedArray object */\n+                                   uint32_t index) /**< the index number */\n+{\n+  JERRY_ASSERT (ecma_is_typedarray (ecma_make_object_value (obj_p)));\n+\n+  ecma_length_t array_length = ecma_typedarray_get_length (obj_p);\n+\n+  if (index >= array_length)\n+  {\n+    return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);\n+  }\n+\n+  ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (obj_p);\n+  ecma_length_t offset = ecma_typedarray_get_offset (obj_p);\n+  uint8_t shift = ecma_typedarray_get_element_size_shift (obj_p);\n+  ecma_length_t byte_pos = (index << shift) + offset;\n+  lit_magic_string_id_t class_id = ecma_object_get_class_name (obj_p);\n+  lit_utf8_byte_t *target_p = ecma_arraybuffer_get_buffer (arraybuffer_p) + byte_pos;\n+  ecma_value_t value;\n+\n+#define TYPEDARRAY_GET_INDEXED_ELEMENT(type) \\\n+  type v = *((type *) target_p); \\\n+  value = ecma_make_number_value ((ecma_number_t) v);\n+\n+  switch (class_id)\n+  {\n+    case LIT_MAGIC_STRING_INT8_ARRAY_UL:\n+    {\n+      TYPEDARRAY_GET_INDEXED_ELEMENT (int8_t);\n+      break;\n+    }\n+    case LIT_MAGIC_STRING_UINT8_ARRAY_UL:\n+    case LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL:\n+    {\n+      TYPEDARRAY_GET_INDEXED_ELEMENT (uint8_t);\n+      break;\n+    }\n+    case LIT_MAGIC_STRING_INT16_ARRAY_UL:","path":"jerry-core/ecma/operations/ecma-typedarray-object.c","position":735,"original_position":735,"commit_id":"61d3fe1fbc4c428b512c80fbec2458d78de82379","original_commit_id":"61d3fe1fbc4c428b512c80fbec2458d78de82379","user":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"body":"We should not add other types to this patch. There are corner cases we need to discuss first, and they just increase binary size at the moment.","created_at":"2017-01-10T13:50:13Z","updated_at":"2017-01-10T13:54:07Z","html_url":"https://github.com/jerryscript-project/jerryscript/pull/1507#discussion_r95366360","pull_request_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507","_links":{"self":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments/95366360"},"html":{"href":"https://github.com/jerryscript-project/jerryscript/pull/1507#discussion_r95366360"},"pull_request":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507"}}},"pull_request":{"url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507","id":99320702,"html_url":"https://github.com/jerryscript-project/jerryscript/pull/1507","diff_url":"https://github.com/jerryscript-project/jerryscript/pull/1507.diff","patch_url":"https://github.com/jerryscript-project/jerryscript/pull/1507.patch","issue_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1507","number":1507,"state":"open","locked":false,"title":"[ES2015 profile]add TypedArray intrinsic object","user":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"body":"* add %TypedArray% intrinsic object\r\n* implement Int8Array\r\n* will implement other types and prototype functions\r\nin the following patches.\r\n\r\nEach typedarray object has following struct\r\n  * ecma_object_t\r\n  * extended_part (it is class type, with class id and array length)\r\n  * typedarray_info_t (contains the internal arraybuffer object, byteoffset and element size)\r\n\r\nAlso it fixed a bug for arraybuffer. Each bytes in the buffer should be initialized to 0.\r\n\r\nJerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com","created_at":"2016-12-25T11:44:20Z","updated_at":"2017-01-10T13:54:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26afcc8312534911236f331562697ddd4de480fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507/commits","review_comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507/comments","review_comment_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1507/comments","statuses_url":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/61d3fe1fbc4c428b512c80fbec2458d78de82379","head":{"label":"jiangzidong:typedarray1220","ref":"typedarray1220","sha":"61d3fe1fbc4c428b512c80fbec2458d78de82379","user":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"repo":{"id":43999422,"name":"jerryscript","full_name":"jiangzidong/jerryscript","owner":{"login":"jiangzidong","id":15059452,"avatar_url":"https://avatars.githubusercontent.com/u/15059452?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangzidong","html_url":"https://github.com/jiangzidong","followers_url":"https://api.github.com/users/jiangzidong/followers","following_url":"https://api.github.com/users/jiangzidong/following{/other_user}","gists_url":"https://api.github.com/users/jiangzidong/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangzidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangzidong/subscriptions","organizations_url":"https://api.github.com/users/jiangzidong/orgs","repos_url":"https://api.github.com/users/jiangzidong/repos","events_url":"https://api.github.com/users/jiangzidong/events{/privacy}","received_events_url":"https://api.github.com/users/jiangzidong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiangzidong/jerryscript","description":"Ultra-lightweight JavaScript engine for Internet of Things. http://www.jerryscript.net","fork":true,"url":"https://api.github.com/repos/jiangzidong/jerryscript","forks_url":"https://api.github.com/repos/jiangzidong/jerryscript/forks","keys_url":"https://api.github.com/repos/jiangzidong/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiangzidong/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiangzidong/jerryscript/teams","hooks_url":"https://api.github.com/repos/jiangzidong/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/jiangzidong/jerryscript/events","assignees_url":"https://api.github.com/repos/jiangzidong/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/jiangzidong/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/jiangzidong/jerryscript/tags","blobs_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiangzidong/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/jiangzidong/jerryscript/languages","stargazers_url":"https://api.github.com/repos/jiangzidong/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/jiangzidong/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/jiangzidong/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/jiangzidong/jerryscript/subscription","commits_url":"https://api.github.com/repos/jiangzidong/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiangzidong/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiangzidong/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiangzidong/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/jiangzidong/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiangzidong/jerryscript/merges","archive_url":"https://api.github.com/repos/jiangzidong/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiangzidong/jerryscript/downloads","issues_url":"https://api.github.com/repos/jiangzidong/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/jiangzidong/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/jiangzidong/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/jiangzidong/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiangzidong/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/jiangzidong/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/jiangzidong/jerryscript/deployments","created_at":"2015-10-10T07:17:28Z","updated_at":"2016-11-25T06:26:19Z","pushed_at":"2017-01-04T00:34:10Z","git_url":"git://github.com/jiangzidong/jerryscript.git","ssh_url":"git@github.com:jiangzidong/jerryscript.git","clone_url":"https://github.com/jiangzidong/jerryscript.git","svn_url":"https://github.com/jiangzidong/jerryscript","homepage":"","size":12259,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jerryscript-project:master","ref":"master","sha":"0026519040a4d29bd0264db845ff3cc67789a9cb","user":{"login":"jerryscript-project","id":23194380,"avatar_url":"https://avatars.githubusercontent.com/u/23194380?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryscript-project","html_url":"https://github.com/jerryscript-project","followers_url":"https://api.github.com/users/jerryscript-project/followers","following_url":"https://api.github.com/users/jerryscript-project/following{/other_user}","gists_url":"https://api.github.com/users/jerryscript-project/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryscript-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryscript-project/subscriptions","organizations_url":"https://api.github.com/users/jerryscript-project/orgs","repos_url":"https://api.github.com/users/jerryscript-project/repos","events_url":"https://api.github.com/users/jerryscript-project/events{/privacy}","received_events_url":"https://api.github.com/users/jerryscript-project/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"jerryscript-project/jerryscript","owner":{"login":"jerryscript-project","id":23194380,"avatar_url":"https://avatars.githubusercontent.com/u/23194380?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryscript-project","html_url":"https://github.com/jerryscript-project","followers_url":"https://api.github.com/users/jerryscript-project/followers","following_url":"https://api.github.com/users/jerryscript-project/following{/other_user}","gists_url":"https://api.github.com/users/jerryscript-project/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryscript-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryscript-project/subscriptions","organizations_url":"https://api.github.com/users/jerryscript-project/orgs","repos_url":"https://api.github.com/users/jerryscript-project/repos","events_url":"https://api.github.com/users/jerryscript-project/events{/privacy}","received_events_url":"https://api.github.com/users/jerryscript-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jerryscript-project/jerryscript","description":"Ultra-lightweight JavaScript engine for the Internet of Things.","fork":false,"url":"https://api.github.com/repos/jerryscript-project/jerryscript","forks_url":"https://api.github.com/repos/jerryscript-project/jerryscript/forks","keys_url":"https://api.github.com/repos/jerryscript-project/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerryscript-project/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerryscript-project/jerryscript/teams","hooks_url":"https://api.github.com/repos/jerryscript-project/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/jerryscript-project/jerryscript/events","assignees_url":"https://api.github.com/repos/jerryscript-project/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/jerryscript-project/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/jerryscript-project/jerryscript/tags","blobs_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/jerryscript-project/jerryscript/languages","stargazers_url":"https://api.github.com/repos/jerryscript-project/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/jerryscript-project/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/jerryscript-project/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/jerryscript-project/jerryscript/subscription","commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/jerryscript-project/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/jerryscript-project/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerryscript-project/jerryscript/merges","archive_url":"https://api.github.com/repos/jerryscript-project/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerryscript-project/jerryscript/downloads","issues_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/jerryscript-project/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/jerryscript-project/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerryscript-project/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/jerryscript-project/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/deployments","created_at":"2015-04-03T01:10:31Z","updated_at":"2017-01-10T12:53:15Z","pushed_at":"2017-01-10T12:06:08Z","git_url":"git://github.com/jerryscript-project/jerryscript.git","ssh_url":"git@github.com:jerryscript-project/jerryscript.git","clone_url":"https://github.com/jerryscript-project/jerryscript.git","svn_url":"https://github.com/jerryscript-project/jerryscript","homepage":"http://jerryscript.net","size":27847,"stargazers_count":2111,"watchers_count":2111,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":234,"mirror_url":null,"open_issues_count":41,"forks":234,"open_issues":41,"watchers":2111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507"},"html":{"href":"https://github.com/jerryscript-project/jerryscript/pull/1507"},"issue":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1507"},"comments":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1507/comments"},"review_comments":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507/comments"},"review_comment":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1507/commits"},"statuses":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/61d3fe1fbc4c428b512c80fbec2458d78de82379"}}}}
{"actor":{"display_login":"zherczeg"}}