mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-08-17 10:30:32 +03:00
ForkedAbruptCompletion created with generator containing joinCondition (#2272)
Summary: Release Notes: None PR solved by hermanventer's recent PR, just adding another test case closer to the one in the issue. Resolves #2248 Pull Request resolved: https://github.com/facebook/prepack/pull/2272 Differential Revision: D8938294 Pulled By: cblappert fbshipit-source-id: 18e4fd3b8913400b98242eff06f011ed0140459b
This commit is contained in:
parent
19272b5725
commit
f80b4af956
19
test/serializer/optimized-functions/2248-repro.js
Normal file
19
test/serializer/optimized-functions/2248-repro.js
Normal file
@ -0,0 +1,19 @@
|
||||
function fn(str, start) {
|
||||
var size = str.length;
|
||||
var posA = 0;
|
||||
if (start > 0) {
|
||||
for (; start > 0 && posA < size; start--) {
|
||||
posA += 1 + str.charCodeAt(posA);
|
||||
}
|
||||
if (posA >= size) {
|
||||
return posA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (global.__optimize) __optimize(fn);
|
||||
|
||||
global.inspect = function() {
|
||||
let res1 = fn("abcdef", 1);
|
||||
return res1;
|
||||
};
|
Loading…
Reference in New Issue
Block a user