Reviewers: marja,
Message:
PTAL
Description:
Pass --noharmony-scoping to tests validating that we throw on 'const' in
strict
mode.
[email protected]
BUG=v8:2198
LOG=N
Please review this at https://codereview.chromium.org/784323002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+16, -1 lines):
M test/mjsunit/strict-mode.js
M test/preparser/strict-const.js
M test/preparser/testcfg.py
Index: test/mjsunit/strict-mode.js
diff --git a/test/mjsunit/strict-mode.js b/test/mjsunit/strict-mode.js
index
0c27a1c43363452a6d3af5190d9cbb119a7690e3..0fafd80a8dfcbced4ec75e2f7052a4142d1db996
100644
--- a/test/mjsunit/strict-mode.js
+++ b/test/mjsunit/strict-mode.js
@@ -25,7 +25,7 @@
// (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: --turbo-deoptimization
+// Flags: --turbo-deoptimization --noharmony-scoping
function CheckStrictMode(code, exception) {
assertDoesNotThrow(code);
Index: test/preparser/strict-const.js
diff --git a/test/preparser/strict-const.js b/test/preparser/strict-const.js
index
2b9230c05367c8eaca97de1651e7e3a68d13338f..97b908128ed6ddd775ae79acbb8ae7cdbab91a07
100644
--- a/test/preparser/strict-const.js
+++ b/test/preparser/strict-const.js
@@ -24,6 +24,8 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (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: --noharmony-scoping
"use strict";
const x = 42;
Index: test/preparser/testcfg.py
diff --git a/test/preparser/testcfg.py b/test/preparser/testcfg.py
index
850c0a45898591dfc4017fd8bf6defbc0b61f12f..82b011df19527060ea7cca2ab02c0bdd911ab6e3
100644
--- a/test/preparser/testcfg.py
+++ b/test/preparser/testcfg.py
@@ -34,6 +34,10 @@ from testrunner.local import utils
from testrunner.objects import testcase
+FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
+INVALID_FLAGS = ["--enable-slow-asserts"]
+
+
class PreparserTestSuite(testsuite.TestSuite):
def __init__(self, name, root):
super(PreparserTestSuite, self).__init__(name, root)
@@ -104,6 +108,15 @@ class PreparserTestSuite(testsuite.TestSuite):
first = testcase.flags[0]
if first != "-e":
testcase.flags[0] = os.path.join(self.root, first)
+ source = self.GetSourceForTest(testcase)
+ result = []
+ flags_match = re.findall(FLAGS_PATTERN, source)
+ for match in flags_match:
+ result += match.strip().split()
+ result += context.mode_flags
+ result = [x for x in result if x not in INVALID_FLAGS]
+ result.append(os.path.join(self.root, testcase.path + ".js"))
+ return testcase.flags + result
return testcase.flags
def GetSourceForTest(self, testcase):
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.