Build fix for 32-bit float ecma-number storage (#1669)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -86,6 +86,10 @@
|
||||
&& CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT64 */
|
||||
#endif /* !CONFIG_ECMA_NUMBER_TYPE */
|
||||
|
||||
#if (!defined (CONFIG_DISABLE_DATE_BUILTIN) && (CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32))
|
||||
# error "Date does not support float32"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Representation for ecma-characters
|
||||
*/
|
||||
|
||||
@@ -817,7 +817,7 @@ ecma_builtin_string_prototype_object_replace_get_string (ecma_builtin_replace_se
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
arguments_list[match_length] = ecma_make_number_value (context_p->match_start);
|
||||
arguments_list[match_length] = ecma_make_uint32_value (context_p->match_start);
|
||||
arguments_list[match_length + 1] = ecma_copy_value (context_p->input_string);
|
||||
|
||||
ECMA_TRY_CATCH (result_value,
|
||||
@@ -1117,7 +1117,7 @@ ecma_builtin_string_prototype_object_replace_loop (ecma_builtin_replace_search_c
|
||||
ECMA_TRY_CATCH (put_value,
|
||||
ecma_op_object_put (regexp_obj_p,
|
||||
last_index_string_p,
|
||||
ecma_make_number_value (context_p->match_end + 1),
|
||||
ecma_make_uint32_value (context_p->match_end + 1),
|
||||
true),
|
||||
ret_value);
|
||||
|
||||
@@ -1529,7 +1529,7 @@ ecma_builtin_helper_split_match (ecma_value_t input_string, /**< first argument
|
||||
ecma_property_value_t *index_prop_value_p = ecma_get_named_data_property (obj_p, magic_index_str_p);
|
||||
|
||||
ecma_number_t index_num = ecma_get_number_from_value (index_prop_value_p->value);
|
||||
ecma_value_assign_number (&index_prop_value_p->value, index_num + start_idx);
|
||||
ecma_value_assign_number (&index_prop_value_p->value, index_num + (ecma_number_t) start_idx);
|
||||
|
||||
ecma_deref_ecma_string (magic_index_str_p);
|
||||
}
|
||||
|
||||
@@ -1375,8 +1375,8 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
|
||||
if (sub_str_p != NULL
|
||||
&& input_buffer_p != NULL)
|
||||
{
|
||||
lastindex_num = lit_utf8_string_length (input_buffer_p,
|
||||
(lit_utf8_size_t) (sub_str_p - input_buffer_p));
|
||||
lastindex_num = (ecma_number_t) lit_utf8_string_length (input_buffer_p,
|
||||
(lit_utf8_size_t) (sub_str_p - input_buffer_p));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
var obj = {};
|
||||
var array = ["foo", 19, "bar", obj, "foo", 29, "baz"];
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
var len;
|
||||
var d = [];
|
||||
assert (d.length === 0);
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
var func = function(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
var func = function(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
var array = [54, undefined, "Lemon", -127];
|
||||
|
||||
var array1 = array.slice();
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
function setDefaultValues()
|
||||
{
|
||||
return [54, undefined, -127, "sunshine"];
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
// URI encoding
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
function checkEncodeURIParseError (str)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
// Checking primitve types
|
||||
var str;
|
||||
var result;
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// This test will not pass on FLOAT32 due to precision issues
|
||||
|
||||
assert((NaN).toString() === "NaN");
|
||||
assert((-Infinity).toString() === "-Infinity");
|
||||
assert((Infinity).toString() === "Infinity");
|
||||
|
||||
Reference in New Issue
Block a user