Home | History | Annotate | Download | only in gn

Lines Matching refs:scope

16 #include "tools/gn/scope.h"
25 Value RunTemplateInvocation(Scope* scope,
31 if (!EnsureNotProcessingImport(invocation, scope, err))
34 Scope block_scope(scope);
35 if (!FillTargetBlockScope(scope, invocation,
45 // Now run the rule itself with that block as the current scope.
59 const Scope* scope,
61 if (scope->IsProcessingImport()) {
72 const Scope* scope,
74 if (scope->IsProcessingBuildConfig()) {
83 bool FillTargetBlockScope(const Scope* scope,
88 Scope* block_scope,
95 // Copy the target defaults, if any, into the scope we're going to execute
97 const Scope* default_scope = scope->GetTargetDefaults(target_type);
134 const Label& ToolchainLabelForScope(const Scope* scope) {
135 return scope->settings()->toolchain_label();
138 Label MakeLabelForScope(const Scope* scope,
141 const Label& toolchain_label = ToolchainLabelForScope(scope);
142 return Label(scope->GetSourceDir(), name, toolchain_label.dir(),
164 Value RunAssert(Scope* scope,
253 Scope* scope,
256 !EnsureNotProcessingImport(function, scope, err))
259 Label label(MakeLabelForScope(scope, function, args[0].string_value()));
265 scoped_ptr<Config> config(new Config(scope->settings(), label));
269 const SourceDir& input_dir = scope->GetSourceDir();
270 ConfigValuesGenerator gen(&config->config_values(), scope, input_dir, err);
276 scope->settings()->build_settings()->ItemDefined(config.PassAs<Item>());
286 " Introduces the given arguments into the current scope. If they are\n"
304 Value RunDeclareArgs(Scope* scope,
309 Scope block_scope(scope);
314 // Pass the values from our scope into the Args object for adding to the
315 // scope with the proper values (taking into account the defaults given in
317 Scope::KeyValueMap values;
319 scope->settings()->build_settings()->build_args().DeclareArgs(
320 values, scope, err);
346 Value RunDefined(Scope* scope,
359 if (scope->GetValue(identifier->value().value()))
368 "import: Import a file into the current scope.\n"
371 " executing the given file into the current scope.\n"
384 " The imported file's scope will be merged with the scope at the point\n"
385 " import was called. If there is a conflict (both the current scope and\n"
397 Value RunImport(Scope* scope,
404 const SourceDir& input_dir = scope->GetSourceDir();
407 scope->settings()->import_manager().DoImport(import_file, function,
408 scope, err);
433 " list of filters. This will apply until the current scope exits\n"
439 Value RunSetSourcesAssignmentFilter(Scope* scope,
449 scope->set_sources_assignment_filter(f.Pass());
473 Value RunPrint(Scope* scope,
577 Value RunFunction(Scope* scope,
590 scope->GetTemplate(function->function().value().as_string());
592 Value args = args_list->Execute(scope, err);
595 return RunTemplateInvocation(scope, function, args.list_value(), block,
605 scope, function, args_list, err);
609 Value args = args_list->Execute(scope, err);
619 scope, function, args.list_value(), block, err);
628 Scope block_scope(scope);
637 return found_function->second.no_block_runner(scope, function,