OLD | NEW |
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 itertools | 6 import itertools |
7 import js2c | 7 import js2c |
8 import multiprocessing | 8 import multiprocessing |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 29 matching lines...) Expand all Loading... |
40 # functions they define are so trivial that it's unclear how much benefit | 40 # functions they define are so trivial that it's unclear how much benefit |
41 # that would provide: | 41 # that would provide: |
42 # ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION | 42 # ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION |
43 # FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 43 # FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
44 # TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 44 # TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
45 | 45 |
46 # Counts of functions in each detection state. These are used to assert | 46 # Counts of functions in each detection state. These are used to assert |
47 # that the parser doesn't bit-rot. Change the values as needed when you add, | 47 # that the parser doesn't bit-rot. Change the values as needed when you add, |
48 # remove or change runtime functions, but make sure we don't lose our ability | 48 # remove or change runtime functions, but make sure we don't lose our ability |
49 # to parse them! | 49 # to parse them! |
50 EXPECTED_FUNCTION_COUNT = 417 | 50 EXPECTED_FUNCTION_COUNT = 418 |
51 EXPECTED_FUZZABLE_COUNT = 332 | 51 EXPECTED_FUZZABLE_COUNT = 333 |
52 EXPECTED_CCTEST_COUNT = 8 | 52 EXPECTED_CCTEST_COUNT = 8 |
53 EXPECTED_UNKNOWN_COUNT = 4 | 53 EXPECTED_UNKNOWN_COUNT = 4 |
54 EXPECTED_BUILTINS_COUNT = 809 | 54 EXPECTED_BUILTINS_COUNT = 809 |
55 | 55 |
56 | 56 |
57 # Don't call these at all. | 57 # Don't call these at all. |
58 BLACKLISTED = [ | 58 BLACKLISTED = [ |
59 "Abort", # Kills the process. | 59 "Abort", # Kills the process. |
60 "AbortJS", # Kills the process. | 60 "AbortJS", # Kills the process. |
61 "CompileForOnStackReplacement", # Riddled with ASSERTs. | 61 "CompileForOnStackReplacement", # Riddled with ASSERTs. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 "SetDebugEventListener": ["undefined", None, None], | 249 "SetDebugEventListener": ["undefined", None, None], |
250 "SetFunctionBreakPoint": [None, 200, None, None], | 250 "SetFunctionBreakPoint": [None, 200, None, None], |
251 "StringBuilderConcat": ["[1, 2, 3]", 3, None, None], | 251 "StringBuilderConcat": ["[1, 2, 3]", 3, None, None], |
252 "StringBuilderJoin": ["['a', 'b']", 4, None, None], | 252 "StringBuilderJoin": ["['a', 'b']", 4, None, None], |
253 "StringMatch": [None, None, "['a', 'b']", None], | 253 "StringMatch": [None, None, "['a', 'b']", None], |
254 "StringNormalize": [None, 2, None], | 254 "StringNormalize": [None, 2, None], |
255 "StringReplaceGlobalRegExpWithString": [None, None, None, "['a']", None], | 255 "StringReplaceGlobalRegExpWithString": [None, None, None, "['a']", None], |
256 "TypedArrayInitialize": [None, 6, "new ArrayBuffer(8)", None, 4, None], | 256 "TypedArrayInitialize": [None, 6, "new ArrayBuffer(8)", None, 4, None], |
257 "TypedArrayInitializeFromArrayLike": [None, 6, None, None, None], | 257 "TypedArrayInitializeFromArrayLike": [None, 6, None, None, None], |
258 "TypedArraySetFastCases": [None, None, "0", None], | 258 "TypedArraySetFastCases": [None, None, "0", None], |
| 259 "FunctionIsArrow": ["() => null", None], |
259 } | 260 } |
260 | 261 |
261 | 262 |
262 # Types of arguments that cannot be generated in a JavaScript testcase. | 263 # Types of arguments that cannot be generated in a JavaScript testcase. |
263 NON_JS_TYPES = [ | 264 NON_JS_TYPES = [ |
264 "Code", "Context", "FixedArray", "FunctionTemplateInfo", | 265 "Code", "Context", "FixedArray", "FunctionTemplateInfo", |
265 "JSFunctionResultCache", "JSMessageObject", "Map", "ScopeInfo", | 266 "JSFunctionResultCache", "JSMessageObject", "Map", "ScopeInfo", |
266 "SharedFunctionInfo"] | 267 "SharedFunctionInfo"] |
267 | 268 |
268 | 269 |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 for i in range(len(processes)): | 1400 for i in range(len(processes)): |
1400 processes[i].join() | 1401 processes[i].join() |
1401 except KeyboardInterrupt: | 1402 except KeyboardInterrupt: |
1402 stop_running.set() | 1403 stop_running.set() |
1403 for i in range(len(processes)): | 1404 for i in range(len(processes)): |
1404 processes[i].join() | 1405 processes[i].join() |
1405 return 0 | 1406 return 0 |
1406 | 1407 |
1407 if __name__ == "__main__": | 1408 if __name__ == "__main__": |
1408 sys.exit(Main()) | 1409 sys.exit(Main()) |
OLD | NEW |