Title: [181353] trunk/Source/_javascript_Core
- Revision
- 181353
- Author
- mmir...@apple.com
- Date
- 2015-03-10 17:33:03 -0700 (Tue, 10 Mar 2015)
Log Message
Functions should have initialization precedence over arguments.
https://bugs.webkit.org/show_bug.cgi?id=142550
rdar://problem/19702564
Reviewed by Geoffrey Garen.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeCapturedVariable):
* tests/stress/initialize_functions_after_arguments.js: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (181352 => 181353)
--- trunk/Source/_javascript_Core/ChangeLog 2015-03-10 23:19:38 UTC (rev 181352)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-03-11 00:33:03 UTC (rev 181353)
@@ -1,3 +1,16 @@
+2015-03-10 Matthew Mirman <mmir...@apple.com>
+
+ Functions should have initialization precedence over arguments.
+ https://bugs.webkit.org/show_bug.cgi?id=142550
+ rdar://problem/19702564
+
+ Reviewed by Geoffrey Garen.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::initializeCapturedVariable):
+ * tests/stress/initialize_functions_after_arguments.js: Added.
+
2015-03-10 Andreas Kling <akl...@apple.com>
Eden collections should trigger sweep of MarkedBlocks containing new objects.
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (181352 => 181353)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2015-03-10 23:19:38 UTC (rev 181352)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2015-03-11 00:33:03 UTC (rev 181353)
@@ -388,7 +388,7 @@
continue;
}
auto simpleParameter = static_cast<const BindingNode*>(pattern);
- if (capturedArguments.size() && capturedArguments[i]) {
+ if (capturedArguments.size() && capturedArguments[i] && !m_functions.contains(simpleParameter->boundProperty().impl())) {
ASSERT((functionNode->hasCapturedVariables() && functionNode->captures(simpleParameter->boundProperty())) || shouldCaptureAllTheThings);
index = capturedArguments[i]->index();
RegisterID original(nextParameterIndex);
Added: trunk/Source/_javascript_Core/tests/stress/initialize_functions_after_arguments.js (0 => 181353)
--- trunk/Source/_javascript_Core/tests/stress/initialize_functions_after_arguments.js (rev 0)
+++ trunk/Source/_javascript_Core/tests/stress/initialize_functions_after_arguments.js 2015-03-11 00:33:03 UTC (rev 181353)
@@ -0,0 +1,8 @@
+(function (Thing){
+ function Thing() {
+ }
+ function other() {
+ Thing;
+ }
+ Thing();
+})(2)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes