Lines Matching full:local
31 local DIR = arg[0]:match("^(.+)/[^/]+$")
33 local FLAGS = {
50 local ARGS = {}
53 local flag = arg[i]:match "^%-%-([%w_-]+)$"
55 local no, real_flag = flag:match "^(no)([%w_-]+)$"
69 local ARCHS = ARGS[1] and { ARGS[1] } or { 'ia32', 'arm', 'x64', 'arm64' }
71 local io = require "io"
72 local os = require "os"
82 local CLANG_BIN = os.getenv "CLANG_BIN"
83 local CLANG_PLUGINS = os.getenv "CLANG_PLUGINS"
93 local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define)
115 local cmd_line = MakeClangCommandLine(cfg.plugin,
121 local action = cmd_line .. " " .. filename .. " 2>&1"
123 local pipe = io.popen(action)
125 local success = pipe:close()
133 local function ParseGYPFile()
134 local gyp = ""
135 local gyp_files = { "tools/gyp/v8.gyp", "test/cctest/cctest.gyp" }
137 local f = assert(io.open(gyp_files[i]), "failed to open GYP file")
138 local t = f:read('*a')
143 local result = {}
159 local function EvaluateCondition(cond, props)
162 local p, v = cond:match "(%w+):(%w+)"
170 local function BuildFileList(sources, props)
171 local list = {}
180 local sources = ParseGYPFile()
182 local function FilesForArch(arch)
189 local mtConfig = {}
193 local function config (t) return setmetatable(t, mtConfig) end
196 local e = {}
202 local ARCHITECTURES = {
216 local gc, gc_caused, funcs
218 local WHITELIST = {
243 local function AddCause(name, cause)
244 local t = gc_caused[name]
252 local function resolve(name)
253 local f = funcs[name]
276 local function parse (filename, lines)
277 local scope
284 local name = funcname:sub(2)
290 local function propagate ()
293 local function mark(from, callers)
308 local function GenerateGCSuspects(arch, files, cfg)
319 local out = assert(io.open("gcsuspects", "w"))
323 local out = assert(io.open("gccauses", "w"))
339 local function CheckCorrectnessForArch(arch)
340 local files = FilesForArch(arch)
341 local cfg = ARCHITECTURES[arch]
347 local processed_files = 0
348 local errors_found = false
349 local function SearchForErrors(filename, lines)
363 local plugin_args
376 local function SafeCheckCorrectnessForArch(arch)
377 local status, errors = pcall(CheckCorrectnessForArch, arch)
385 local errors = false