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 = 421 | 50 EXPECTED_FUNCTION_COUNT = 422 |
51 EXPECTED_FUZZABLE_COUNT = 335 | 51 EXPECTED_FUZZABLE_COUNT = 336 |
52 EXPECTED_CCTEST_COUNT = 8 | 52 EXPECTED_CCTEST_COUNT = 8 |
53 EXPECTED_UNKNOWN_COUNT = 4 | 53 EXPECTED_UNKNOWN_COUNT = 4 |
54 EXPECTED_BUILTINS_COUNT = 815 | 54 EXPECTED_BUILTINS_COUNT = 815 |
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 "InternalDateFormat": [_DATETIME_FORMAT, None, None], | 238 "InternalDateFormat": [_DATETIME_FORMAT, None, None], |
239 "InternalDateParse": [_DATETIME_FORMAT, None, None], | 239 "InternalDateParse": [_DATETIME_FORMAT, None, None], |
240 "InternalNumberFormat": [_NUMBER_FORMAT, None, None], | 240 "InternalNumberFormat": [_NUMBER_FORMAT, None, None], |
241 "InternalNumberParse": [_NUMBER_FORMAT, None, None], | 241 "InternalNumberParse": [_NUMBER_FORMAT, None, None], |
242 "IsSloppyModeFunction": ["function() {}", None], | 242 "IsSloppyModeFunction": ["function() {}", None], |
243 "LoadMutableDouble": ["{foo: 1.2}", None, None], | 243 "LoadMutableDouble": ["{foo: 1.2}", None, None], |
244 "NewObjectFromBound": ["(function() {}).bind({})", None], | 244 "NewObjectFromBound": ["(function() {}).bind({})", None], |
245 "NumberToRadixString": [None, "2", None], | 245 "NumberToRadixString": [None, "2", None], |
246 "ParseJson": ["\"{}\"", 1], | 246 "ParseJson": ["\"{}\"", 1], |
247 "RegExpExecMultiple": [None, None, "['a']", "['a']", None], | 247 "RegExpExecMultiple": [None, None, "['a']", "['a']", None], |
248 "DefineAccessorProperty": [None, None, "undefined", "undefined", None, None], | 248 "DefineApiAccessorProperty": [None, None, "undefined", "undefined", None, None
], |
249 "SetIteratorInitialize": [None, None, "2", None], | 249 "SetIteratorInitialize": [None, None, "2", None], |
250 "SetDebugEventListener": ["undefined", None, None], | 250 "SetDebugEventListener": ["undefined", None, None], |
251 "SetFunctionBreakPoint": [None, 200, None, None], | 251 "SetFunctionBreakPoint": [None, 200, None, None], |
252 "StringBuilderConcat": ["[1, 2, 3]", 3, None, None], | 252 "StringBuilderConcat": ["[1, 2, 3]", 3, None, None], |
253 "StringBuilderJoin": ["['a', 'b']", 4, None, None], | 253 "StringBuilderJoin": ["['a', 'b']", 4, None, None], |
254 "StringMatch": [None, None, "['a', 'b']", None], | 254 "StringMatch": [None, None, "['a', 'b']", None], |
255 "StringNormalize": [None, 2, None], | 255 "StringNormalize": [None, 2, None], |
256 "StringReplaceGlobalRegExpWithString": [None, None, None, "['a']", None], | 256 "StringReplaceGlobalRegExpWithString": [None, None, None, "['a']", None], |
257 "TypedArrayInitialize": [None, 6, "new ArrayBuffer(8)", None, 4, None], | 257 "TypedArrayInitialize": [None, 6, "new ArrayBuffer(8)", None, 4, None], |
258 "TypedArrayInitializeFromArrayLike": [None, 6, None, None, None], | 258 "TypedArrayInitializeFromArrayLike": [None, 6, None, None, None], |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 for i in range(len(processes)): | 1401 for i in range(len(processes)): |
1402 processes[i].join() | 1402 processes[i].join() |
1403 except KeyboardInterrupt: | 1403 except KeyboardInterrupt: |
1404 stop_running.set() | 1404 stop_running.set() |
1405 for i in range(len(processes)): | 1405 for i in range(len(processes)): |
1406 processes[i].join() | 1406 processes[i].join() |
1407 return 0 | 1407 return 0 |
1408 | 1408 |
1409 if __name__ == "__main__": | 1409 if __name__ == "__main__": |
1410 sys.exit(Main()) | 1410 sys.exit(Main()) |
OLD | NEW |