Revision: 12289
Author:   [email protected]
Date:     Fri Aug 10 05:26:33 2012
Log:      Allow multiple lines of custom flags in javascript tests.

[email protected]
BUG=

Review URL: https://chromiumcodereview.appspot.com/10855099
http://code.google.com/p/v8/source/detail?r=12289

Modified:
 /branches/bleeding_edge/test/message/testcfg.py
 /branches/bleeding_edge/test/mjsunit/array-literal-transitions.js
 /branches/bleeding_edge/test/mjsunit/compiler/alloc-object-huge.js
 /branches/bleeding_edge/test/mjsunit/count-based-osr.js
 /branches/bleeding_edge/test/mjsunit/debug-break-inline.js
/branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized-double.js
 /branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized.js
 /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js
/branches/bleeding_edge/test/mjsunit/regress/regress-debug-code-recompilation.js
 /branches/bleeding_edge/test/mjsunit/testcfg.py
 /branches/bleeding_edge/test/mjsunit/unbox-double-arrays.js

=======================================
--- /branches/bleeding_edge/test/message/testcfg.py     Thu Jul 19 03:44:15 2012
+++ /branches/bleeding_edge/test/message/testcfg.py     Fri Aug 10 05:26:33 2012
@@ -81,9 +81,9 @@
   def GetCommand(self):
     result = self.config.context.GetVmCommand(self, self.mode)
     source = open(self.file).read()
-    flags_match = FLAGS_PATTERN.search(source)
-    if flags_match:
-      result += flags_match.group(1).strip().split()
+    flags_match = re.findall(FLAGS_PATTERN, source)
+    for match in flags_match:
+      result += match.strip().split()
     result.append(self.file)
     return result

=======================================
--- /branches/bleeding_edge/test/mjsunit/array-literal-transitions.js Thu Jul 19 11:58:23 2012 +++ /branches/bleeding_edge/test/mjsunit/array-literal-transitions.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,9 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc --noparallel-recompilation
+// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
+// Flags: --noparallel-recompilation
+
 // Test element kind of objects.
 // Since --smi-only-arrays affects builtins, its default setting at compile
 // time sticks if built with snapshot.  If --smi-only-arrays is deactivated
=======================================
--- /branches/bleeding_edge/test/mjsunit/compiler/alloc-object-huge.js Fri Apr 20 03:42:12 2012 +++ /branches/bleeding_edge/test/mjsunit/compiler/alloc-object-huge.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,9 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --allow-natives-syntax --inline-construct --max-inlined-source-size=999999 --max-inlined-nodes=999999 --max-inlined-nodes-cumulative=999999
+// Flags: --allow-natives-syntax --inline-construct
+// Flags: --max-inlined-source-size=999999 --max-inlined-nodes=999999
+// Flags: --max-inlined-nodes-cumulative=999999

 // Test that huge constructors (more than 256 this assignments) are
 // handled correctly.
=======================================
--- /branches/bleeding_edge/test/mjsunit/count-based-osr.js Thu Jul 19 11:58:23 2012 +++ /branches/bleeding_edge/test/mjsunit/count-based-osr.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --count-based-interrupts --interrupt-budget=10 --weighted-back-edges --allow-natives-syntax --noparallel-recompilation +// Flags: --count-based-interrupts --interrupt-budget=10 --weighted-back-edges
+// Flags: --allow-natives-syntax --noparallel-recompilation

// Test that OSR works properly when using count-based interrupting/profiling.

=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-break-inline.js Thu Jul 19 11:58:23 2012 +++ /branches/bleeding_edge/test/mjsunit/debug-break-inline.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --expose-debug-as debug --allow-natives-syntax --noparallel-recompilation
+// Flags: --expose-debug-as debug --allow-natives-syntax
+// Flags: --noparallel-recompilation

 // This test tests that deoptimization due to debug breaks works for
 // inlined functions where the full-code is generated before the
=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized-double.js Thu Apr 26 06:44:18 2012 +++ /branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized-double.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,9 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --expose-debug-as debug --expose-gc --allow-natives-syntax --inline-construct
+// Flags: --expose-debug-as debug --expose-gc --allow-natives-syntax
+// Flags: --inline-construct
+
 // Get the Debug object exposed from the debug context global object.
 Debug = debug.Debug

@@ -43,13 +45,17 @@
 ];

 var expected = [
- { locals: {a0: 1.01, b0: 2.02}, args: { names: ["i", "x0", "y0"], values: [0, 3.03, 4.04] } }, - { locals: {a1: 3.03, b1: 4.04}, args: { names: ["i", "x1", "y1"], values: [1, 5.05, 6.06] } },
-  { locals: {a2: 5.05, b2: 6.06}, args: { names: ["i"], values: [2] } },
-  { locals: {a3: 7.07, b3: 8.08}, args: { names: ["i", "x3", "y3", "z3"],
- values: [3, 9.09, 10.10, undefined] }
-  },
- { locals: {a4: 9.09, b4: 10.10}, args: { names: ["i", "x4", "y4"], values: [4, 11.11, 12.12] } }
+  { locals: {a0: 1.01, b0: 2.02},
+    args: { names: ["i", "x0", "y0"], values: [0, 3.03, 4.04] } },
+  { locals: {a1: 3.03, b1: 4.04},
+    args: { names: ["i", "x1", "y1"], values: [1, 5.05, 6.06] } },
+  { locals: {a2: 5.05, b2: 6.06},
+    args: { names: ["i"], values: [2] } },
+  { locals: {a3: 7.07, b3: 8.08},
+    args: { names: ["i", "x3", "y3", "z3"],
+            values: [3, 9.09, 10.10, undefined] } },
+  { locals: {a4: 9.09, b4: 10.10},
+    args: { names: ["i", "x4", "y4"], values: [4, 11.11, 12.12] } }
 ];

 function arraySum(arr) {
@@ -78,7 +84,8 @@
           // All frames except the bottom one have expected arguments.
           for (var j = 0; j < expected_args.names.length; j++) {
             assertEquals(expected_args.names[j], frame.argumentName(j));
- assertEquals(expected_args.values[j], frame.argumentValue(j).value());
+            assertEquals(expected_args.values[j],
+                         frame.argumentValue(j).value());
           }

           // All frames except the bottom one have two scopes.
@@ -87,13 +94,15 @@
           assertEquals(debug.ScopeType.Global, frame.scope(1).scopeType());

           Object.keys(expected_locals).forEach(function (name) {
- assertEquals(expected_locals[name], frame.scope(0).scopeObject().value()[name]);
+            assertEquals(expected_locals[name],
+                         frame.scope(0).scopeObject().value()[name]);
           });

           for (var j = 0; j < expected_args.names.length; j++) {
             var arg_name = expected_args.names[j];
             var arg_value = expected_args.values[j];
- assertEquals(arg_value, frame.scope(0).scopeObject().value()[arg_name]);
+            assertEquals(arg_value,
+                         frame.scope(0).scopeObject().value()[arg_name]);
           }

           // Evaluate in the inlined frame.
@@ -114,7 +123,8 @@
                        map(function (k) { return expected_locals[k]; }));

           assertEquals(expected_locals_sum + expected_args_sum,
- frame.evaluate(Object.keys(expected_locals).join('+') + ' + ' + + frame.evaluate(Object.keys(expected_locals).join('+') +
+                                      ' + ' +
expected_args.names.join('+')).value());

           var arguments_sum = expected_args.names.map(function(_, idx) {
=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized.js Thu Apr 26 06:44:18 2012 +++ /branches/bleeding_edge/test/mjsunit/debug-evaluate-locals-optimized.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,9 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --expose-debug-as debug --expose-gc --allow-natives-syntax --inline-construct
+// Flags: --expose-debug-as debug --expose-gc --allow-natives-syntax
+// Flags: --inline-construct
+
 // Get the Debug object exposed from the debug context global object.
 Debug = debug.Debug

@@ -35,11 +37,16 @@
 var testingConstructCall = false;

 var expected = [
- { locals: {a0: 1, b0: 2}, args: { names: ["i", "x0", "y0"], values: [0, 3, 4] } }, - { locals: {a1: 3, b1: 4}, args: { names: ["i", "x1", "y1"], values: [1, 5, 6] } },
-  { locals: {a2: 5, b2: 6}, args: { names: ["i"], values: [2] } },
- { locals: {a3: 7, b3: 8}, args: { names: ["i", "x3", "y3", "z3"], values: [3, 9, 10, undefined] } }, - { locals: {a4: 9, b4: 10}, args: { names: ["i", "x4", "y4"], values: [4, 11, 12] } }
+  { locals: {a0: 1, b0: 2},
+    args: { names: ["i", "x0", "y0"], values: [0, 3, 4] } },
+  { locals: {a1: 3, b1: 4},
+    args: { names: ["i", "x1", "y1"], values: [1, 5, 6] } },
+  { locals: {a2: 5, b2: 6},
+    args: { names: ["i"], values: [2] } },
+  { locals: {a3: 7, b3: 8},
+ args: { names: ["i", "x3", "y3", "z3"], values: [3, 9, 10, undefined] } },
+  { locals: {a4: 9, b4: 10},
+    args: { names: ["i", "x4", "y4"], values: [4, 11, 12] } }
 ];

 function arraySum(arr) {
@@ -68,7 +75,8 @@
           // All frames except the bottom one have expected arguments.
           for (var j = 0; j < expected_args.names.length; j++) {
             assertEquals(expected_args.names[j], frame.argumentName(j));
- assertEquals(expected_args.values[j], frame.argumentValue(j).value());
+            assertEquals(expected_args.values[j],
+                         frame.argumentValue(j).value());
           }

           // All frames except the bottom one have two scopes.
@@ -77,13 +85,15 @@
           assertEquals(debug.ScopeType.Global, frame.scope(1).scopeType());

           Object.keys(expected_locals).forEach(function (name) {
- assertEquals(expected_locals[name], frame.scope(0).scopeObject().value()[name]);
+            assertEquals(expected_locals[name],
+                         frame.scope(0).scopeObject().value()[name]);
           });

           for (var j = 0; j < expected_args.names.length; j++) {
             var arg_name = expected_args.names[j];
             var arg_value = expected_args.values[j];
- assertEquals(arg_value, frame.scope(0).scopeObject().value()[arg_name]);
+            assertEquals(arg_value,
+                         frame.scope(0).scopeObject().value()[arg_name]);
           }

           // Evaluate in the inlined frame.
@@ -104,7 +114,8 @@
                        map(function (k) { return expected_locals[k]; }));

           assertEquals(expected_locals_sum + expected_args_sum,
- frame.evaluate(Object.keys(expected_locals).join('+') + ' + ' + + frame.evaluate(Object.keys(expected_locals).join('+') +
+                                      ' + ' +
expected_args.names.join('+')).value());

           var arguments_sum = expected_args.names.map(function(_, idx) {
=======================================
--- /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js Thu Jul 19 11:58:23 2012 +++ /branches/bleeding_edge/test/mjsunit/elements-transition-hoisting.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc --noparallel-recompilation
+// Flags: --allow-natives-syntax --smi-only-arrays --expose-gc
+// Flags: --noparallel-recompilation

// Ensure that ElementsKind transitions in various situations are hoisted (or // not hoisted) correctly, don't change the semantics programs and don't trigger
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-debug-code-recompilation.js Wed Jan 25 07:11:59 2012 +++ /branches/bleeding_edge/test/mjsunit/regress/regress-debug-code-recompilation.js Fri Aug 10 05:26:33 2012
@@ -25,7 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Flags: --allow-natives-syntax --hydrogen-filter=Debug.setBreakPoint --expose-debug-as debug
+// Flags: --allow-natives-syntax --hydrogen-filter=Debug.setBreakPoint
+// Flags: --expose-debug-as debug

 Debug = debug.Debug

=======================================
--- /branches/bleeding_edge/test/mjsunit/testcfg.py     Mon Jul 25 22:56:45 2011
+++ /branches/bleeding_edge/test/mjsunit/testcfg.py     Fri Aug 10 05:26:33 2012
@@ -56,9 +56,9 @@

   def GetVmCommand(self, source):
     result = self.config.context.GetVmCommand(self, self.mode)
-    flags_match = FLAGS_PATTERN.search(source)
-    if flags_match:
-      result += flags_match.group(1).strip().split()
+    flags_match = re.findall(FLAGS_PATTERN, source);
+    for match in flags_match:
+      result += match.strip().split()
     return result

   def GetVmArguments(self, source):
=======================================
--- /branches/bleeding_edge/test/mjsunit/unbox-double-arrays.js Thu Jul 19 11:58:23 2012 +++ /branches/bleeding_edge/test/mjsunit/unbox-double-arrays.js Fri Aug 10 05:26:33 2012
@@ -27,7 +27,9 @@

 // Test dictionary -> double elements -> dictionary elements round trip

-// Flags: --allow-natives-syntax --unbox-double-arrays --expose-gc --noparallel-recompilation
+// Flags: --allow-natives-syntax --unbox-double-arrays --expose-gc
+// Flags: --noparallel-recompilation
+
 var large_array_size = 100000;
 var approx_dict_to_elements_threshold = 70000;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to