Ensure that fast array objects are always extensible (#4557)

This patch helps to eliminate some extra checks from Array.prototype methods

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-02-03 16:17:50 +01:00
committed by GitHub
parent 090b6307a6
commit 1712ad5dc4
3 changed files with 17 additions and 32 deletions
@@ -12,12 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
var array = [$, Infinity]
var array = [5.1, Infinity]
Reflect.preventExtensions(array);
try {
var $ = array.pop()
assert(false);
} catch (e) {
assert(e instanceof TypeError);
}
assert(array.pop() == Infinity);