Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Side by Side Diff: tools/generate-runtime-tests.py

Issue 289503002: ES6 Map/Set iterators/forEach improvements (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: partial code review feedback update Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/objects.cc ('K') | « test/mjsunit/runtime-gen/setiteratorclose.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import re 7 import re
8 import shutil 8 import shutil
9 import sys 9 import sys
10 10
11 # TODO(jkummerow): Support DATA_VIEW_{G,S}ETTER in runtime.cc 11 # TODO(jkummerow): Support DATA_VIEW_{G,S}ETTER in runtime.cc
12 12
13 FILENAME = "src/runtime.cc" 13 FILENAME = "src/runtime.cc"
14 HEADERFILENAME = "src/runtime.h" 14 HEADERFILENAME = "src/runtime.h"
15 FUNCTION = re.compile("^RUNTIME_FUNCTION\(Runtime_(\w+)") 15 FUNCTION = re.compile("^RUNTIME_FUNCTION\(Runtime_(\w+)")
16 ARGSLENGTH = re.compile(".*ASSERT\(.*args\.length\(\) == (\d+)\);") 16 ARGSLENGTH = re.compile(".*ASSERT\(.*args\.length\(\) == (\d+)\);")
17 FUNCTIONEND = "}\n" 17 FUNCTIONEND = "}\n"
18 18
19 WORKSPACE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) 19 WORKSPACE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
20 BASEPATH = os.path.join(WORKSPACE, "test", "mjsunit", "runtime-gen") 20 BASEPATH = os.path.join(WORKSPACE, "test", "mjsunit", "runtime-gen")
21 THIS_SCRIPT = os.path.relpath(sys.argv[0]) 21 THIS_SCRIPT = os.path.relpath(sys.argv[0])
22 22
23 # Counts of functions in each detection state. These are used to assert 23 # Counts of functions in each detection state. These are used to assert
24 # that the parser doesn't bit-rot. Change the values as needed when you add, 24 # that the parser doesn't bit-rot. Change the values as needed when you add,
25 # remove or change runtime functions, but make sure we don't lose our ability 25 # remove or change runtime functions, but make sure we don't lose our ability
26 # to parse them! 26 # to parse them!
27 EXPECTED_FUNCTION_COUNT = 338 27 EXPECTED_FUNCTION_COUNT = 336
28 EXPECTED_FUZZABLE_COUNT = 305 28 EXPECTED_FUZZABLE_COUNT = 303
29 EXPECTED_CCTEST_COUNT = 6 29 EXPECTED_CCTEST_COUNT = 6
30 EXPECTED_UNKNOWN_COUNT = 5 30 EXPECTED_UNKNOWN_COUNT = 5
31 31
32 32
33 # Don't call these at all. 33 # Don't call these at all.
34 BLACKLISTED = [ 34 BLACKLISTED = [
35 "Abort", # Kills the process. 35 "Abort", # Kills the process.
36 "AbortJS", # Kills the process. 36 "AbortJS", # Kills the process.
37 "CompileForOnStackReplacement", # Riddled with ASSERTs. 37 "CompileForOnStackReplacement", # Riddled with ASSERTs.
38 "IS_VAR", # Not implemented in the runtime. 38 "IS_VAR", # Not implemented in the runtime.
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 CheckTestcasesExisting(js_fuzzable_functions) 503 CheckTestcasesExisting(js_fuzzable_functions)
504 504
505 if error: 505 if error:
506 sys.exit(1) 506 sys.exit(1)
507 print("Generated runtime tests: all good.") 507 print("Generated runtime tests: all good.")
508 sys.exit(0) 508 sys.exit(0)
509 509
510 if action == "generate": 510 if action == "generate":
511 GenerateTestcases(js_fuzzable_functions) 511 GenerateTestcases(js_fuzzable_functions)
512 sys.exit(0) 512 sys.exit(0)
OLDNEW
« src/objects.cc ('K') | « test/mjsunit/runtime-gen/setiteratorclose.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698