-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…n't distinguish typed array from virtual typed array Merge pull request #5732 from pleath:19011798 Do not attempt to optimize the ValueType in case of typed array.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
let xxx = new Uint32Array(0x10000); | ||
|
||
xxx.slice = Array.prototype.slice; | ||
|
||
function jit(arr, index){ | ||
let ut = arr.slice(0,0); //become definite Uint32Array but |arr| is a VirtualUint32Array | ||
for(let i = 0; i < 0x30; i++){ | ||
arr[i] = 0; //will be crash at |Op_memset| | ||
} | ||
} | ||
|
||
for(let i = 0;i < 0x10000; i++){ | ||
jit(xxx, 2); | ||
} | ||
|
||
if (xxx[0] === 0) | ||
{ | ||
WScript.Echo('pass'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters