Title: [153224] trunk/LayoutTests/fast/js/resources/standalone-pre.js
- Revision
- 153224
- Author
- [email protected]
- Date
- 2013-07-24 21:02:48 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: A few fixups to standalone-pre.js
Modified Paths
Diff
Modified: trunk/LayoutTests/fast/js/resources/standalone-pre.js (153223 => 153224)
--- trunk/LayoutTests/fast/js/resources/standalone-pre.js 2013-07-25 04:02:47 UTC (rev 153223)
+++ trunk/LayoutTests/fast/js/resources/standalone-pre.js 2013-07-25 04:02:48 UTC (rev 153224)
@@ -1,5 +1,6 @@
var wasPostTestScriptParsed = false;
var errorMessage;
+var self = this;
function description(msg)
{
@@ -157,6 +158,52 @@
debug("\nTEST COMPLETE\n");
}
+
+function dfgCompiled(argument)
+{
+ var numberOfCompiles = "compiles" in argument ? argument.compiles : 1;
+
+ if (!("f" in argument))
+ throw new Error("dfgCompiled called with invalid argument.");
+
+ if (argument.f instanceof Array) {
+ for (var i = 0; i < argument.f.length; ++i) {
+ if (testRunner.numberOfDFGCompiles(argument.f[i]) < numberOfCompiles)
+ return false;
+ }
+ } else {
+ if (testRunner.numberOfDFGCompiles(argument.f) < numberOfCompiles)
+ return false;
+ }
+
+ return true;
+}
+
+function dfgIncrement(argument)
+{
+ if (!self.testRunner)
+ return argument.i;
+
+ if (argument.i < argument.n)
+ return argument.i;
+
+ if (didFailSomeTests)
+ return argument.i;
+
+ if (!dfgCompiled(argument))
+ return "start" in argument ? argument.start : 0;
+
+ return argument.i;
+}
+
+function noInline(theFunction)
+{
+ if (!self.testRunner)
+ return;
+
+ testRunner.neverInlineFunction(theFunction);
+}
+
// It's possible for an async test to call finishJSTest() before js-test-post.js
// has been parsed.
function finishJSTest()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes