This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge chakra-core/ChakraCore@f497760a25] [1.6>1.7] [MERGE #3460 @meg…
…-gupta] Fix order of generating bailout info in ValueNumberLdElem Merge pull request #3460 from meg-gupta:fixldelemvaluenumber When there is an early return in try finally, we have to execute the finally block before returning So we add edges from early return block to finally block and finally block back to early return block. If an instruction assigning to s0 is type specialized and s0 already exists in bytecodeUpwardExposedUsed While populating bailout info, we will end up using the type specialized symbol instead of s0 even for pre opt bailout. Because we don't differentiate between pre-op bailout and post-op bailout while populating bailout info The type specialized symbol gets added on bytecodeUpwardExposed used, due to this gets added to upwardExposedUsed If this instruction was in a loop, gets added to liveOnBackEdge syms. This causes asserts in register allocator, when it extends the lifetime of the type specialized symbol to the entire loop. This is a problem only with try-finallys. For non-EH functions, the early return block gets moved out of the loop due to break block removal. With try finallys, these blocks are not moved out due to the early return -> finally and finally -> early return edges. This happens only with return s0 symbol, because we avoid creating new temporary destination register for the s0 case. This happens only in ValueNumberLdElem because it first calls TypeSpecializeIntDst and TypeSpecializeFloatDst and then calls GenerateBailAtOperation for the pre-op bailout.
- Loading branch information
Showing
3 changed files
with
89 additions
and
33 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
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,17 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// 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 i32 = new Int32Array(); | ||
while (parseInt()) { | ||
for (var _strvar0 of uic8) { | ||
return i32[66]; | ||
} | ||
} | ||
} | ||
test0(); | ||
test0(); | ||
test0(); | ||
WScript.Echo("passed"); |