~paul-lucas/zorba/feature-transcode_streambuf-2

« back to all changes in this revision

Viewing changes to src/compiler/rewriter/rules/nodeid_rules.cpp

  • Committer: Tarmac
  • Author(s): Markos Zaharioudakis
  • Date: 2012-03-01 12:04:13 UTC
  • mfrom: (10584.1.59 markos-scratch)
  • Revision ID: tarmac-20120301120413-xl41rw2addpsvut6
fixed bug involing eval and the no-copy rule Approved: Markos Zaharioudakis

Show diffs side-by-side

added added

removed removed

Lines of Context:
862
862
 
863
863
  case eval_expr_kind:
864
864
  {
 
865
    eval_expr* e = static_cast<eval_expr*>(node);
 
866
 
 
867
    // Conservatively assume that, when executed, the eval query will apply
 
868
    // a "node-id-sensitive" operation on each of the in-scope variables, so
 
869
    // these variables must be bound to statndalone trees.
 
870
    csize numEvalVars = e->var_count();
 
871
 
 
872
    for (csize i = 0; i < numEvalVars; ++i)
 
873
    {
 
874
      expr* arg = e->get_arg_expr(i);
 
875
 
 
876
      std::vector<expr*> sources;
 
877
      theSourceFinder->findNodeSources(arg, &udfCaller, sources);
 
878
      markSources(sources);
 
879
    }
 
880
 
865
881
    std::vector<var_expr_t> globalVars;
866
882
    node->get_sctx()->getVariables(globalVars, false, true);
867
883