Title: [281665] trunk
- Revision
- 281665
- Author
- [email protected]
- Date
- 2021-08-26 15:43:32 -0700 (Thu, 26 Aug 2021)
Log Message
r281485 was not sufficient in where it called disablePeepholeOptimization
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/_javascript_Core:
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):
Modified Paths
Added Paths
Diff
Modified: trunk/JSTests/ChangeLog (281664 => 281665)
--- trunk/JSTests/ChangeLog 2021-08-26 22:43:29 UTC (rev 281664)
+++ trunk/JSTests/ChangeLog 2021-08-26 22:43:32 UTC (rev 281665)
@@ -1,3 +1,14 @@
+2021-08-26 Saam Barati <[email protected]>
+
+ 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 <[email protected]>
Update Intl tests to support ICU 68
Added: trunk/JSTests/stress/for-in-disable-bytecode-generator-peephole-optimizations-after-rewrite-2.js (0 => 281665)
--- trunk/JSTests/stress/for-in-disable-bytecode-generator-peephole-optimizations-after-rewrite-2.js (rev 0)
+++ trunk/JSTests/stress/for-in-disable-bytecode-generator-peephole-optimizations-after-rewrite-2.js 2021-08-26 22:43:32 UTC (rev 281665)
@@ -0,0 +1,12 @@
+function foo() {
+ for (var c in b) {
+ if (b.hasOwnProperty(c)) {
+ var e = b[c];
+ c = "str";
+ }
+ }
+}
+
+try {
+ foo();
+} catch { }
Modified: trunk/Source/_javascript_Core/ChangeLog (281664 => 281665)
--- trunk/Source/_javascript_Core/ChangeLog 2021-08-26 22:43:29 UTC (rev 281664)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-08-26 22:43:32 UTC (rev 281665)
@@ -1,3 +1,18 @@
+2021-08-26 Saam Barati <[email protected]>
+
+ 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 <[email protected]>
[AppleWin] JSC build failure
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (281664 => 281665)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2021-08-26 22:43:29 UTC (rev 281664)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2021-08-26 22:43:32 UTC (rev 281665)
@@ -5386,6 +5386,7 @@
auto end = branchInstIndex + instruction->size();
generator.m_writer.seek(branchInstIndex);
+ generator.disablePeepholeOptimization();
OpJmp::emit(&generator, BoundLabel(static_cast<int>(newBranchTarget) - static_cast<int>(branchInstIndex)));
@@ -5393,9 +5394,8 @@
OpNop::emit<OpcodeSize::Narrow>(&generator);
}
+ generator.m_writer.seek(generator.m_writer.size());
generator.disablePeepholeOptimization(); // We might've just changed the last bytecode that was emitted.
-
- generator.m_writer.seek(generator.m_writer.size());
}
void StaticPropertyAnalysis::record()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes