Changeset 171391 in webkit for trunk/Source/JavaScriptCore/build-symbol-table-index.py
- Timestamp:
- Jul 22, 2014, 9:33:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/build-symbol-table-index.py
r167087 r171391 5 5 import subprocess 6 6 import sys 7 from sets import Set 7 8 from operator import itemgetter 8 9 … … 23 24 framework_directory = os.path.join(os.getenv("BUILT_PRODUCTS_DIR"), os.getenv("JAVASCRIPTCORE_RESOURCES_DIR"), "Runtime", current_arch) 24 25 26 25 27 symbol_table_location = os.path.join(framework_directory, "Runtime.symtbl") 26 28 … … 34 36 symbol_table_modification_time = os.path.getmtime(symbol_table_location) 35 37 36 file_suffix = "bc .gz"38 file_suffix = "bc" 37 39 file_suffix_length = len(file_suffix) 40 41 tested_symbols_location = "./tested-symbols.symlst" 42 include_symbol_table_location = os.path.join(os.getenv("SHARED_DERIVED_FILE_DIR"), "JavaScriptCore/InlineRuntimeSymbolTable.h") 43 44 tested_symbols = Set([]) 45 46 if os.path.isfile(tested_symbols_location): 47 with open(tested_symbols_location, 'r') as file: 48 print("Loading tested symbols") 49 for line in file: 50 tested_symbols.add(line[:-1]) 38 51 39 52 for bitcode_file in glob.iglob(os.path.join(framework_directory, "*." + file_suffix)): … … 49 62 50 63 for symbol in lines: 51 if symbol[:2] == "__" and symbol[-3:] != ".eh" :52 symbol_table[symbol ] = bitcode_basename[1:]64 if symbol[:2] == "__" and symbol[-3:] != ".eh" and symbol in tested_symbols: 65 symbol_table[symbol[1:]] = bitcode_basename 53 66 54 67 if not symbol_table_is_out_of_date: … … 68 81 print("Writing symbol table") 69 82 70 with open(symbol_table_location, "w") as file: 71 for symbol, location in symbol_list: 72 file.write("{} {}\n".format(symbol, location)) 73 83 with open(symbol_table_location, "w") as symbol_file: 84 with open(include_symbol_table_location, "w") as include_file: 85 include_file.write("#define FOR_EACH_LIBRARY_SYMBOL(macro)") 86 for symbol, location in symbol_list: 87 symbol_file.write("{} {}\n".format(symbol, location)) 88 include_file.write(" \\\nmacro(\"{}\", \"{}\")".format(symbol, location)) 89 include_file.write("\n") 74 90 print("Done")
Note:
See TracChangeset
for help on using the changeset viewer.