• R/O
  • SSH
  • HTTPS

adp: Commit


Commit MetaInfo

Revisión303 (tree)
Tiempo2012-06-08 01:03:35
Autorohfuji

Log Message

fix compile error with gcc

Cambiar Resumen

Diferencia incremental

--- trunk/adp_unify.cpp (revision 302)
+++ trunk/adp_unify.cpp (revision 303)
@@ -53,7 +53,8 @@
5353 /*************************************** unify ******************************************/
5454
5555 // 変項のunify本体で使うテンプレート関数
56-template <class V, class T> bool __forceinline vunify(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
56+template <class V, class T> bool __forceinline vunify(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
57+template <class V, class T> bool __forceinline vunify(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
5758 {
5859 const PObject *gitem = (*glocal)[goal.idx];
5960 if ( gitem == 0 ) {
@@ -65,7 +66,8 @@
6566 return true;
6667 }
6768
68-template <class V, class T> bool __forceinline vmatch_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal) __attribute__((always_inline))
69+template <class V, class T> bool __forceinline vmatch_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal) __attribute__((always_inline));
70+template <class V, class T> bool __forceinline vmatch_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal)
6971 {
7072 const PObject *item = (*hlocal)[horn.idx];
7173 if ( item == 0 ) {
@@ -77,7 +79,8 @@
7779 return true;
7880 }
7981
80-template <class V, class T> bool __forceinline vmatch_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal) __attribute__((always_inline))
82+template <class V, class T> bool __forceinline vmatch_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal) __attribute__((always_inline));
83+template <class V, class T> bool __forceinline vmatch_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal)
8184 {
8285 const PObject *item = (*glocal)[goal.idx];
8386 if ( item == 0 ) {
@@ -89,7 +92,8 @@
8992 return true;
9093 }
9194
92-template <class V, class T> bool __forceinline vunify_getval(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
95+template <class V, class T> bool __forceinline vunify_getval(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
96+template <class V, class T> bool __forceinline vunify_getval(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
9397 {
9498 const PObject *gitem = (*glocal)[goal.idx];
9599 if ( gitem == 0 ) {
@@ -102,7 +106,8 @@
102106 return true;
103107 }
104108
105-template <class V, class T> bool __forceinline vmatch_getval_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal) __attribute__((always_inline))
109+template <class V, class T> bool __forceinline vmatch_getval_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal) __attribute__((always_inline));
110+template <class V, class T> bool __forceinline vmatch_getval_h_g(const V &horn, const T &goal, ExecContext *c, VLocal *hlocal)
106111 {
107112 const PObject *item = (*hlocal)[horn.idx];
108113 if ( item == 0 ) {
@@ -119,7 +124,8 @@
119124 return true;
120125 }
121126
122-template <class V, class T> bool __forceinline vmatch_getval_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal) __attribute__((always_inline))
127+template <class V, class T> bool __forceinline vmatch_getval_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal) __attribute__((always_inline));
128+template <class V, class T> bool __forceinline vmatch_getval_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal)
123129 {
124130 const PObject *item = (*glocal)[goal.idx];
125131 if ( item == 0 ) {
@@ -136,7 +142,8 @@
136142 return true;
137143 }
138144
139-template <class V, class T> bool __forceinline vunify_ver(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
145+template <class V, class T> bool __forceinline vunify_ver(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
146+template <class V, class T> bool __forceinline vunify_ver(const V &goal, const T &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
140147 {
141148 const PObject *gval = (*glocal)[goal.idx];
142149 const PObject *hval = (*hlocal)[horn.idx];
@@ -156,7 +163,8 @@
156163 return true;
157164 }
158165
159-template <class V, class T> bool __forceinline vmatch_ver_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
166+template <class V, class T> bool __forceinline vmatch_ver_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
167+template <class V, class T> bool __forceinline vmatch_ver_g_h(const V &goal, const T &horn, ExecContext *c, VLocal *glocal, VLocal *hlocal)
160168 {
161169 const PObject *gval = (*glocal)[goal.idx];
162170 const PObject *hval = (*hlocal)[horn.idx];
@@ -271,18 +279,21 @@
271279 bool PInteger::match_g_h(const PEVeriable &horn, ExecContext *c) const { return vmatch_h_g(horn, *this, c, horn.vl); }
272280
273281 /*************************************** PList ******************************************/
274-static __forceinline bool PList_unify(const PList &list) __attribute__((always_inline))
282+static __forceinline bool PList_unify(const PList &list) __attribute__((always_inline));
283+static __forceinline bool PList_unify(const PList &list)
275284 {
276285 if ( typeid(*list.lvalue) == typeid(PNil) && typeid(*list.rvalue) == typeid(PNil) ) return true;
277286 return false;
278287 }
279-static __forceinline bool PList_unify(const PList &goal, const PList &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
288+static __forceinline bool PList_unify(const PList &goal, const PList &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
289+static __forceinline bool PList_unify(const PList &goal, const PList &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
280290 {
281291 if ( horn.lvalue->unify( *goal.lvalue, c, hlocal, glocal) && horn.rvalue->unify( *goal.rvalue, c, hlocal, glocal) ) return true;
282292 return false;
283293 }
284294
285-static __forceinline bool PList_match(const PList &goal, const PList &horn, ExecContext *c) __attribute__((always_inline))
295+static __forceinline bool PList_match(const PList &goal, const PList &horn, ExecContext *c) __attribute__((always_inline));
296+static __forceinline bool PList_match(const PList &goal, const PList &horn, ExecContext *c)
286297 {
287298 if ( horn.lvalue->match_h_g( *goal.lvalue, c) && horn.rvalue->match_h_g( *goal.rvalue, c) ) return true;
288299 return false;
@@ -311,7 +322,8 @@
311322 bool PList::match_g_h(const PEVeriable &horn, ExecContext *c) const { return vmatch_getval_h_g(horn, *this, c, horn.vl); }
312323
313324 /*************************************** PArray ******************************************/
314-static __forceinline bool PArray_unify(const PArray &goal, const PArray &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
325+static __forceinline bool PArray_unify(const PArray &goal, const PArray &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
326+static __forceinline bool PArray_unify(const PArray &goal, const PArray &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
315327 {
316328 size_t gsiz = goal.value.size();
317329 size_t hsiz = horn.value.size();
@@ -361,7 +373,8 @@
361373 return true;
362374 }
363375
364-static __forceinline bool PArray_match(const PArray &goal, const PArray &horn, ExecContext *c) __attribute__((always_inline))
376+static __forceinline bool PArray_match(const PArray &goal, const PArray &horn, ExecContext *c) __attribute__((always_inline));
377+static __forceinline bool PArray_match(const PArray &goal, const PArray &horn, ExecContext *c)
365378 {
366379 size_t gsiz = goal.value.size();
367380 size_t hsiz = horn.value.size();
@@ -433,7 +446,8 @@
433446 bool PArray::match_g_h(const PEVeriable &horn, ExecContext *c) const { return vmatch_getval_h_g(horn, *this, c, horn.vl); }
434447
435448 /*************************************** PPredicate ******************************************/
436-static __forceinline bool PPredicate_unify(const PPredicate &goal, const PPredicate &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline))
449+static __forceinline bool PPredicate_unify(const PPredicate &goal, const PPredicate &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal) __attribute__((always_inline));
450+static __forceinline bool PPredicate_unify(const PPredicate &goal, const PPredicate &horn, ExecContextRoot *c, VLocal *glocal, VLocal *hlocal)
437451 {
438452 // 呼び出し側(goal)がnamespaceを指定した場合、namespaceが一致している必要がある。
439453 if ( !goal.nspace.empty() && strcmp( horn.nspace.c_str(), goal.nspace.c_str()) != 0 ) { return false; }
@@ -442,7 +456,8 @@
442456 return goal.arglist.unify( horn.arglist, c, glocal, hlocal); // horn.arglistがPObjectでない場合はこのように呼び出す
443457 }
444458
445-static __forceinline bool PPredicate_match(const PPredicate &goal, const PPredicate &horn, ExecContext *c) __attribute__((always_inline))
459+static __forceinline bool PPredicate_match(const PPredicate &goal, const PPredicate &horn, ExecContext *c) __attribute__((always_inline));
460+static __forceinline bool PPredicate_match(const PPredicate &goal, const PPredicate &horn, ExecContext *c)
446461 {
447462 // 呼び出し側(goal)がnamespaceを指定した場合、namespaceが一致している必要がある。
448463 if ( !goal.nspace.empty() && strcmp( horn.nspace.c_str(), goal.nspace.c_str()) != 0 ) { return false; }
Show on old repository browser