Lines Matching full:local

31 local DIR = arg[0]:match("^(.+)/[^/]+$")
33 local FLAGS = {
53 local ARGS = {}
56 local flag = arg[i]:match "^%-%-([%w_-]+)$"
58 local no, real_flag = flag:match "^(no)([%w_-]+)$"
72 local ARCHS = ARGS[1] and { ARGS[1] } or { 'ia32', 'arm', 'x64', 'arm64' }
74 local io = require "io"
75 local os = require "os"
85 local CLANG_BIN = os.getenv "CLANG_BIN"
86 local CLANG_PLUGINS = os.getenv "CLANG_PLUGINS"
96 local function MakeClangCommandLine(
121 local function IterTable(t)
129 local function SplitResults(lines, func)
132 local current = {}
133 local filename = ""
135 local new_file = line:match "^______________ (.*)$"
136 local code = line:match "^______________ finish (%d+) ______________$"
156 local cmd_line = MakeClangCommandLine(cfg.plugin,
165 local action = cmd_line .. " " .. filename .. " 2>&1"
167 local pipe = io.popen(action)
169 local success = pipe:close()
174 local action = "python tools/gcmole/parallel.py \""
177 local pipe = io.popen(action)
178 local success = SplitResults(pipe:lines(), func)
179 local closed = pipe:close()
186 local function ParseGNFile()
187 local result = {}
188 local gn_files = {
194 local filename = gn_files[i][1]
195 local pattern = gn_files[i][2]
196 local prefix = gn_files[i][3]
197 local gn_file = assert(io.open(filename), "failed to open GN file")
198 local gn = gn_file:read('*a')
212 local function EvaluateCondition(cond, props)
215 local p, v = cond:match "(%w+):(%w+)"
223 local function BuildFileList(sources, props)
224 local list = {}
234 local gn_sources = ParseGNFile()
236 local function FilesForArch(arch)
243 local mtConfig = {}
247 local function config (t) return setmetatable(t, mtConfig) end
250 local e = {}
256 local ARCHITECTURES = {
274 local gc, gc_caused, funcs
276 local WHITELIST = {
300 local function AddCause(name, cause)
301 local t = gc_caused[name]
309 local function resolve(name)
310 local f = funcs[name]
333 local function parse (filename, lines)
334 local scope
341 local name = funcname:sub(2)
347 local function propagate ()
350 local function mark(from, callers)
365 local function GenerateGCSuspects(arch, files, cfg)
376 local out = assert(io.open("gcsuspects", "w"))
380 local out = assert(io.open("gccauses", "w"))
396 local function CheckCorrectnessForArch(arch)
397 local files = FilesForArch(arch)
398 local cfg = ARCHITECTURES[arch]
404 local processed_files = 0
405 local errors_found = false
406 local function SearchForErrors(filename, lines)
420 local plugin_args
433 local function SafeCheckCorrectnessForArch(arch)
434 local status, errors = pcall(CheckCorrectnessForArch, arch)
442 local errors = false