Skip to content

Commit

Permalink
Memop fix related to scanning for missing values
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatd committed Jun 12, 2018
1 parent f8e9e55 commit e6b59af
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Runtime/Library/JavascriptArray.inl
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ SECOND_PASS:
else if (!HasNoMissingValues())
{
// Have we overwritten all the missing values?
if (!ScanForMissingValues<T>(0, startOffset))
if (!ScanForMissingValues<T>(0, startOffset) && !ScanForMissingValues<T>(startOffset + length, current->length))
{
SetHasNoMissingValues();
}
Expand Down
26 changes: 26 additions & 0 deletions test/Array/memop_missingValues.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------

function test0()
{
var GiantPrintArray = [];
var IntArr0 = new Array(1, 1);
var FloatArr0 = [];
FloatArr0[1] = 1;
FloatArr0[0] = 1;
FloatArr0[12] = 1;
var v5;
v5 = IntArr0.length;
for (var i = 0; i < v5; i++) {
FloatArr0[i] = IntArr0[i];
}
GiantPrintArray.push(FloatArr0);
for (var v2 = 0; 0 < GiantPrintArray; 0) {
}
}
test0();
test0();
test0();
print("passed");
6 changes: 6 additions & 0 deletions test/Array/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,12 @@
<compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
</default>
</test>
<test>
<default>
<files>memop_missingValues.js</files>
<compile-flags>-mmoc:0</compile-flags>
</default>
</test>
<test>
<default>
<files>bug4587739.js</files>
Expand Down

0 comments on commit e6b59af

Please sign in to comment.