Home | History | Annotate | Download | only in gn

Lines Matching refs:scope

10 #include "tools/gn/scope.h"
14 Template::Template(const Scope* scope, const FunctionCallNode* def)
15 : closure_(scope->MakeClosure()),
19 Template::Template(scoped_ptr<Scope> scope, const FunctionCallNode* def)
20 : closure_(scope.Pass()),
27 Value Template::Invoke(Scope* scope,
34 if (!EnsureNotProcessingImport(invocation, scope, err))
37 // First run the invocation's block. Need to allocate the scope on the heap
39 scoped_ptr<Scope> invocation_scope(new Scope(scope));
40 if (!FillTargetBlockScope(scope, invocation,
48 // Set up the scope to run the template and set the current directory for the
54 Scope template_scope(closure_.get());
55 template_scope.set_source_dir(scope->GetSourceDir());
60 template_scope.set_item_collector(scope->GetItemCollector());
62 // We jump through some hoops to avoid copying the invocation scope when
63 // setting it in the template scope (since the invocation scope may have
66 // Scope.SetValue will copy the value which will in turn copy the scope, but
67 // if we instead create a value and then set the scope on it, the copy can
70 template_scope.SetValue(kInvoker, Value(NULL, scoped_ptr<Scope>()),
74 template_scope.set_source_dir(scope->GetSourceDir());
91 // Check for unused variables in the invocation scope. This will find typos
96 // to overwrite the value of "invoker" and free the Scope owned by the
100 if (invoker_value && invoker_value->type() == Value::SCOPE) {