Optimize string character access for ascii strings and refactor type store

to allow two byte hashes in the future.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-03-21 02:24:35 -07:00
parent 91b1547fa5
commit af246943f2
5 changed files with 343 additions and 154 deletions
@@ -1,4 +1,5 @@
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
* Copyright 2016 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.
@@ -138,7 +139,7 @@ ecma_op_string_object_get_own_property (ecma_object_t *obj_p, /**< a String obje
uint32_t uint32_index;
ecma_string_t *new_prop_name_p;
if (property_name_p->container == ECMA_STRING_CONTAINER_UINT32_IN_DESC)
if (ECMA_STRING_GET_CONTAINER (property_name_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC)
{
uint32_index = property_name_p->u.uint32_number;