[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

ggaren at apple.com ggaren at apple.com
Wed Dec 22 17:45:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 27454f88398e518f8209e921f31b4dd5ffe9c002
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 29 23:35:11 2010 +0000

    Improved accuracy of command-line SunSpider.
    
    Reviewed by Gavin Barraclough.
    
    JavaScriptCore:
    
    * jsc.cpp:
    (functionRun): Changed the "run" function to run a given test in
    its own global object. Previously, all tests ran in the same global
    object, which created name conflicts, and made globals from previous
    tests artificially survive into later tests.
    
    Also changed "run" to return the elapsed milliseconds when running a
    given test, for slightly more accurate numbers.
    
    (functionCheckSyntax): Ditto on returning elapsed milliseconds.
    
    SunSpider:
    
    * resources/sunspider-standalone-driver.js: Use the returned number of
    elapsed milliseconds from "run" and "checkSyntax" instead of measuring
    ourselves, for slightly more accurate numbers.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72842 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 781e991..a24f051 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-29  Geoffrey Garen  <ggaren at apple.com>
+
+        Reviewed by Gavin Barraclough.
+
+        Improved accuracy of command-line SunSpider.
+
+        * jsc.cpp:
+        (functionRun): Changed the "run" function to run a given test in
+        its own global object. Previously, all tests ran in the same global
+        object, which created name conflicts, and made globals from previous
+        tests artificially survive into later tests.
+        
+        Also changed "run" to return the elapsed milliseconds when running a
+        given test, for slightly more accurate numbers.
+
+        (functionCheckSyntax): Ditto on returning elapsed milliseconds.
+
 2010-11-29  Darin Adler  <darin at apple.com>
 
         Reviewed by Andreas Kling.
diff --git a/JavaScriptCore/jsc.cpp b/JavaScriptCore/jsc.cpp
index 00581e5..5439bad 100644
--- a/JavaScriptCore/jsc.cpp
+++ b/JavaScriptCore/jsc.cpp
@@ -208,14 +208,14 @@ EncodedJSValue JSC_HOST_CALL functionVersion(ExecState*)
 
 EncodedJSValue JSC_HOST_CALL functionRun(ExecState* exec)
 {
-    StopWatch stopWatch;
     UString fileName = exec->argument(0).toString(exec);
     Vector<char> script;
     if (!fillBufferWithContentsOfFile(fileName, script))
         return JSValue::encode(throwError(exec, createError(exec, "Could not open file.")));
 
-    JSGlobalObject* globalObject = exec->lexicalGlobalObject();
+    GlobalObject* globalObject = new (&exec->globalData()) GlobalObject(Vector<UString>());
 
+    StopWatch stopWatch;
     stopWatch.start();
     evaluate(globalObject->globalExec(), globalObject->globalScopeChain(), makeSource(script.data(), fileName));
     stopWatch.stop();
@@ -245,10 +245,15 @@ EncodedJSValue JSC_HOST_CALL functionCheckSyntax(ExecState* exec)
         return JSValue::encode(throwError(exec, createError(exec, "Could not open file.")));
 
     JSGlobalObject* globalObject = exec->lexicalGlobalObject();
+
+    StopWatch stopWatch;
+    stopWatch.start();
     Completion result = checkSyntax(globalObject->globalExec(), makeSource(script.data(), fileName));
+    stopWatch.stop();
+
     if (result.complType() == Throw)
         throwError(exec, result.value());
-    return JSValue::encode(result.value());
+    return JSValue::encode(jsNumber(stopWatch.getElapsedMS()));
 }
 
 #if ENABLE(SAMPLING_FLAGS)
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index 279a389..8241848 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-29  Geoffrey Garen  <ggaren at apple.com>
+
+        Reviewed by Gavin Barraclough.
+
+        Improved accuracy of command-line SunSpider.
+
+        * resources/sunspider-standalone-driver.js: Use the returned number of
+        elapsed milliseconds from "run" and "checkSyntax" instead of measuring
+        ourselves, for slightly more accurate numbers.
+
 2010-09-16  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Mark Rowe.
diff --git a/SunSpider/resources/sunspider-standalone-driver.js b/SunSpider/resources/sunspider-standalone-driver.js
index a015822..136e6b7 100644
--- a/SunSpider/resources/sunspider-standalone-driver.js
+++ b/SunSpider/resources/sunspider-standalone-driver.js
@@ -35,10 +35,9 @@ for (var j = 0; j < tests.length; j++) {
     var testName = suitePath + "/" + tests[j] + ".js";
     var startTime = new Date;
     if (testName.indexOf('parse-only') >= 0)
-        checkSyntax(testName);
+        times[j] = checkSyntax(testName);
     else
-        load(testName);
-    times[j] = new Date() - startTime;
+        times[j] = run(testName);
     gc();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list