Skip to content
Permalink
Browse files
r281485 was not sufficient in where it called disablePeepholeOptimiza…
…tion

https://bugs.webkit.org/show_bug.cgi?id=229582
<rdar://82346980>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/for-in-disable-bytecode-generator-peephole-optimizations-after-rewrite-2.js: Added.
(foo):

Source/JavaScriptCore:

r281485 accidentally deleted a place where we called disablePeepholeOptimization
that was necessary. Basically, after we seek where the current instruction
in BytecodeGenerator is, we need to disablePeepholeOptimization.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::ForInContext::finalize):


Canonical link: https://commits.webkit.org/241018@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
saambarati committed Aug 26, 2021
1 parent 41e2080 commit a511792c9c44b33fd96e9584bcd4fc47b8ef1e08
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
@@ -1,3 +1,14 @@
2021-08-26 Saam Barati <sbarati@apple.com>

r281485 was not sufficient in where it called disablePeepholeOptimization
https://bugs.webkit.org/show_bug.cgi?id=229582
<rdar://82346980>

Reviewed by Yusuke Suzuki.

* stress/for-in-disable-bytecode-generator-peephole-optimizations-after-rewrite-2.js: Added.
(foo):

2021-08-24 Yusuke Suzuki <ysuzuki@apple.com>

Update Intl tests to support ICU 68
@@ -0,0 +1,12 @@
function foo() {
for (var c in b) {
if (b.hasOwnProperty(c)) {
var e = b[c];
c = "str";
}
}
}

try {
foo();
} catch { }
@@ -1,3 +1,18 @@
2021-08-26 Saam Barati <sbarati@apple.com>

r281485 was not sufficient in where it called disablePeepholeOptimization
https://bugs.webkit.org/show_bug.cgi?id=229582
<rdar://82346980>

Reviewed by Yusuke Suzuki.

r281485 accidentally deleted a place where we called disablePeepholeOptimization
that was necessary. Basically, after we seek where the current instruction
in BytecodeGenerator is, we need to disablePeepholeOptimization.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::ForInContext::finalize):

2021-08-26 Per Arne Vollan <pvollan@apple.com>

[AppleWin] JSC build failure
@@ -5386,16 +5386,16 @@ void ForInContext::finalize(BytecodeGenerator& generator, UnlinkedCodeBlockGener
auto end = branchInstIndex + instruction->size();

generator.m_writer.seek(branchInstIndex);
generator.disablePeepholeOptimization();

OpJmp::emit(&generator, BoundLabel(static_cast<int>(newBranchTarget) - static_cast<int>(branchInstIndex)));

while (generator.m_writer.position() < end)
OpNop::emit<OpcodeSize::Narrow>(&generator);
}

generator.disablePeepholeOptimization(); // We might've just changed the last bytecode that was emitted.

generator.m_writer.seek(generator.m_writer.size());
generator.disablePeepholeOptimization(); // We might've just changed the last bytecode that was emitted.
}

void StaticPropertyAnalysis::record()

0 comments on commit a511792

Please sign in to comment.