Home | History | Annotate | Download | only in gn

Lines Matching refs:scope

13 #include "tools/gn/scope.h"
55 Value AccessorNode::Execute(Scope* scope, Err* err) const {
57 return ExecuteArrayAccess(scope, err);
59 return ExecuteScopeAccess(scope, err);
87 Value AccessorNode::ExecuteArrayAccess(Scope* scope, Err* err) const {
88 Value index_value = index_->Execute(scope, err);
94 const Value* base_value = scope->GetValue(base_.value(), true);
126 Value AccessorNode::ExecuteScopeAccess(Scope* scope, Err* err) const {
128 // accessed in the given scope. The value "a" might be in some normal nested
129 // scope and we can modify it, but it might also be inherited from the
130 // readonly root scope and we can't do used variable tracking on it. (It's
131 // not legal to const cast it away since the root scope will be in readonly
136 // Look up the value in the scope named by "base_".
137 Value* mutable_base_value = scope->GetMutableValue(base_.value(), true);
141 if (!mutable_base_value->VerifyTypeIs(Value::SCOPE, err))
146 // Fall back to see if the value is on a read-only scope.
147 const Value* const_base_value = scope->GetValue(base_.value(), true);
150 if (!const_base_value->VerifyTypeIs(Value::SCOPE, err))
162 member_->value().value() + "\" in scope \"" + base_.value() + "\"");
180 Value BinaryOpNode::Execute(Scope* scope, Err* err) const {
181 return ExecuteBinaryOperator(scope, this, left_.get(), right_.get(), err);
212 Value BlockNode::Execute(Scope* containing_scope, Err* err) const {
214 Scope our_scope(containing_scope);
219 // Check for unused vars in the scope.
248 Value BlockNode::ExecuteBlockInScope(Scope* our_scope, Err* err) const {
276 Value ConditionNode::Execute(Scope* scope, Err* err) const {
277 Value condition_result = condition_->Execute(scope, err);
291 if_true_->ExecuteBlockInScope(scope, err);
296 // need to be sure it inherits our scope.
299 if_false_block->ExecuteBlockInScope(scope, err);
301 if_false_->Execute(scope, err);
338 Value FunctionCallNode::Execute(Scope* scope, Err* err) const {
339 return functions::RunFunction(scope, this, args_.get(), block_.get(), err);
375 Value IdentifierNode::Execute(Scope* scope, Err* err) const {
376 const Value* result = scope->GetValue(value_.value(), true);
410 Value ListNode::Execute(Scope* scope, Err* err) const {
417 results[i] = cur->Execute(scope, err);
460 Value LiteralNode::Execute(Scope* scope, Err* err) const {
476 ExpandStringLiteral(scope, value_, &v, err);
510 Value UnaryOpNode::Execute(Scope* scope, Err* err) const {
511 Value operand_value = operand_->Execute(scope, err);
514 return ExecuteUnaryOperator(scope, this, operand_value, err);