Clean up VectorEffects::init
[hiphop-php.git] / hphp / runtime / ext / ext_closure.h
blob875e8f6c76cf53890416636f6b4b7143a2fe3e62
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
18 #ifndef incl_HPHP_EXT_CLOSURE_H_
19 #define incl_HPHP_EXT_CLOSURE_H_
21 // >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
23 #include "hphp/runtime/base/base_includes.h"
24 #include "hphp/runtime/vm/func.h"
26 namespace HPHP {
27 ///////////////////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////////////////
31 // class Closure
33 FORWARD_DECLARE_CLASS_BUILTIN(Closure);
34 class c_Closure : public ExtObjectData {
35 public:
36 DECLARE_CLASS(Closure, Closure, ObjectData)
38 // need to implement
39 public: c_Closure(Class* cls = c_Closure::s_cls);
40 public: ~c_Closure();
41 public: void t___construct();
43 // implemented by HPHP
44 public: c_Closure *create();
45 public:
46 public: c_Closure* clone();
48 c_Closure* init(int numArgs, ActRec* ar, TypedValue* sp);
49 ObjectData* getThisOrClass() { return m_thisOrClass; }
50 const Func* getInvokeFunc() { return m_func; }
51 HphpArray* getStaticLocals();
52 TypedValue* getUseVars() { return propVec(); }
53 int getNumUseVars() { return m_cls->numDeclProperties(); }
55 static size_t funcOffset() { return offsetof(c_Closure, m_func); }
56 static size_t thisOffset() { return offsetof(c_Closure, m_thisOrClass); }
58 protected:
59 virtual bool php_sleep(Variant &ret);
60 private:
61 SmartPtr<HphpArray> m_VMStatics;
62 ObjectData* m_thisOrClass;
63 const Func* m_func;
66 ///////////////////////////////////////////////////////////////////////////////
67 // class DummyClosure
69 FORWARD_DECLARE_CLASS_BUILTIN(DummyClosure);
70 class c_DummyClosure : public ExtObjectData {
71 public:
72 DECLARE_CLASS(DummyClosure, DummyClosure, ObjectData)
74 // need to implement
75 public: c_DummyClosure(Class* cls = c_DummyClosure::s_cls);
76 public: ~c_DummyClosure();
77 public: void t___construct();
79 // implemented by HPHP
80 public: c_DummyClosure *create();
84 ///////////////////////////////////////////////////////////////////////////////
87 #endif // incl_HPHP_EXT_CLOSURE_H_