~zorba-coders/zorba/bugs-912586-912593-912722

« back to all changes in this revision

Viewing changes to src/functions/udf.h

  • Committer: Cezar Andrei
  • Date: 2012-03-28 15:42:12 UTC
  • mfrom: (10606.1.129 zorba)
  • Revision ID: cezar.lp@cezarandrei.com-20120328154212-jh2heq49xcqjppce
Merge from trunck and resolve ChangeLog conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "functions/function.h"
21
21
 
22
22
#include "compiler/expression/expr_base.h"
 
23
#include "zorbatypes/rclist.h"
23
24
 
24
25
 
25
26
namespace zorba 
131
132
  bool                        theCacheResults;
132
133
  bool                        theCacheComputed;
133
134
 
 
135
  rchandle<rclist<user_function*> > theLocalUdfs;//for plan serializer
 
136
 
134
137
public:
135
138
  SERIALIZABLE_CLASS(user_function)
136
139
  user_function(::zorba::serialization::Archiver& ar);
137
140
  void serialize(::zorba::serialization::Archiver& ar);
 
141
  void prepare_for_serialize(CompilerCB* compilerCB);
138
142
 
139
143
public:
140
144
  user_function(
141
145
      const QueryLoc& loc,
142
146
      const signature& sig,
143
147
      expr_t expr_body,
144
 
      short kind);
 
148
      short kind,
 
149
      CompilerCB* compilerCB);
145
150
 
146
151
  virtual ~user_function();
147
152
 
167
172
 
168
173
  const std::vector<var_expr_t>& getArgVars() const;
169
174
 
 
175
  var_expr* getArgVar(csize i) const { return theArgVars[i].getp(); }
 
176
 
170
177
  void setOptimized(bool v) { theIsOptimized = v; }
171
178
 
172
179
  bool isOptimized() const { return theIsOptimized; }
173
180
 
174
 
  void addMutuallyRecursiveUDFs(const std::vector<user_function*>& udfs);
 
181
  void addMutuallyRecursiveUDFs(
 
182
      const std::vector<user_function*>& udfs,
 
183
      const std::vector<user_function*>::const_iterator& cycle);
175
184
 
176
185
  bool isMutuallyRecursiveWith(const user_function* udf);
177
186
 
183
192
 
184
193
  BoolAnnotationValue ignoresDuplicateNodes(expr* fo, csize input) const;
185
194
 
186
 
  BoolAnnotationValue mustCopyNodes(expr* fo, csize input) const;
187
 
 
188
195
  PlanIter_t getPlan(CompilerCB* cb, uint32_t& planStateSize);
189
196
  
 
197
  void invalidatePlan();
 
198
 
190
199
  void setPlaneStateSize(uint32_t size) { thePlanStateSize = size; }
191
200
 
192
201
  const std::vector<ArgVarRefs>& getArgVarsRefs() const;
204
213
        static_context* sctx,
205
214
        const QueryLoc& loc,
206
215
        std::vector<PlanIter_t>& argv,
207
 
        AnnotationHolder& ann) const;
 
216
        expr& ann) const;
208
217
};
209
218
 
210
219