MCPcopy Index your code
hub / github.com/nodejs/node / CreateRuntimeFunctionCallMatcher

Method CreateRuntimeFunctionCallMatcher

deps/v8/tools/v8_presubmit.py:530–544  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

528 self.runtime_function_call_pattern = self.CreateRuntimeFunctionCallMatcher()
529
530 def CreateRuntimeFunctionCallMatcher(self):
531 runtime_h_path = join(dirname(TOOLS_PATH), 'src/runtime/runtime.h')
532 pattern = re.compile(r'\s+F\(([^,]*),.*\)')
533 runtime_functions = []
534 with open(runtime_h_path) as f:
535 for line in f.readlines():
536 m = pattern.match(line)
537 if m:
538 runtime_functions.append(m.group(1))
539 if len(runtime_functions) < 250:
540 print ("Runtime functions list is suspiciously short. "
541 "Consider updating the presubmit script.")
542 sys.exit(1)
543 str = '(\%\s+(' + '|'.join(runtime_functions) + '))[\s\(]'
544 return re.compile(str)
545
546 # Overwriting the one in the parent class.
547 def FindFilesIn(self, path):

Callers 1

__init__Method · 0.95

Calls 9

joinFunction · 0.90
dirnameFunction · 0.90
printFunction · 0.70
matchMethod · 0.65
openFunction · 0.50
compileMethod · 0.45
appendMethod · 0.45
exitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected