diff --git a/src/las.c b/src/las.c
index aa68e849d75c56c993b9dc62d6d4b40cc5c867b6..f53ebf2c30c01a94c25e927f135e3573372535c3 100644
--- a/src/las.c
+++ b/src/las.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: las.c,v 1.372 2006/01/20 17:56:46 grubba Exp $
+|| $Id: las.c,v 1.373 2006/01/21 14:32:36 grubba Exp $
 */
 
 #include "global.h"
@@ -57,6 +57,7 @@ int car_is_node(node *n)
   case F_CONSTANT:
   case F_LOCAL:
   case F_THIS:
+  case F_VERSION:
     return 0;
 
   default:
@@ -74,6 +75,7 @@ int cdr_is_node(node *n)
   case F_CONSTANT:
   case F_LOCAL:
   case F_THIS:
+  case F_VERSION:
     return 0;
 
   default:
@@ -90,6 +92,7 @@ int node_is_leaf(node *n)
   case F_TRAMPOLINE:
   case F_CONSTANT:
   case F_LOCAL:
+  case F_VERSION:
     return 1;
   }
   return 0;
@@ -1297,6 +1300,21 @@ node *debug_mkopernode(char *oper_id, node *arg1, node *arg2)
   return mkefuncallnode(oper_id, arg1);
 }
 
+node *debug_mkversionnode(int major, int minor)
+{
+  node *res = mkemptynode();
+  res->token = F_VERSION;
+#ifdef __CHECKER__
+  _CDR(res) = 0;
+#endif
+  res->u.integer.a = major;
+  res->u.integer.b = minor;
+#ifdef SHARED_NODES
+  res->hash = hash_node(res);
+#endif /* SHARED_NODES */
+  return freeze_node(res);
+}
+
 node *debug_mklocalnode(int var, int depth)
 {
   struct compiler_frame *f;
diff --git a/src/las.h b/src/las.h
index 4448527b7a6b95fad817bd9d9d57d3bfcc742d05..6f35e64e69ee1f486b055dc64e3ba11d397a0d34 100644
--- a/src/las.h
+++ b/src/las.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: las.h,v 1.71 2005/02/18 13:50:12 grubba Exp $
+|| $Id: las.h,v 1.72 2006/01/21 14:32:03 grubba Exp $
 */
 
 #ifndef LAS_H
@@ -203,6 +203,7 @@ node *debug_mkprgnode(struct program *p);
 node *debug_mkapplynode(node *func,node *args);
 node *debug_mkefuncallnode(char *function, node *args);
 node *debug_mkopernode(char *oper_id, node *arg1, node *arg2);
+node *debug_mkversionnode(int major, int minor);
 node *debug_mklocalnode(int var, int depth);
 node *debug_mkidentifiernode(int i);
 node *debug_mktrampolinenode(int i, struct compiler_frame *depth);
@@ -254,6 +255,7 @@ void resolv_program(node *n);
 #define mkapplynode(func, args) dmalloc_touch(node *, debug_mkapplynode(dmalloc_touch(node *, func),dmalloc_touch(node *, args)))
 #define mkefuncallnode(function, args) dmalloc_touch(node *, debug_mkefuncallnode(function, dmalloc_touch(node *, args)))
 #define mkopernode(oper_id, arg1, arg2) dmalloc_touch(node *, debug_mkopernode(oper_id, dmalloc_touch(node *, arg1), dmalloc_touch(node *, arg2)))
+#define mkversionnode(major, minor) dmalloc_touch(node *, debug_mkversionnode(major, minor))
 #define mklocalnode(var, depth) dmalloc_touch(node *, debug_mklocalnode(var, depth))
 #define mkidentifiernode(i) dmalloc_touch(node *, debug_mkidentifiernode(i))
 #define mktrampolinenode(i,f) dmalloc_touch(node *, debug_mktrampolinenode(i, f))