Fix code generator.
authorIlya V. Portnov <i.portnov@compassplus.ru>
Fri, 30 Sep 2011 08:04:18 +0000 (14:04 +0600)
committerIlya V. Portnov <i.portnov@compassplus.ru>
Fri, 30 Sep 2011 08:04:18 +0000 (14:04 +0600)
JVM/Generator.hs

index 9db24e66cf5b5e9f69b93cc11c955738f0324f60..6291b068fcc4322d09068f99b4e556a93d686f52 100644 (file)
@@ -38,7 +38,7 @@ addItem :: Constant -> Generate Word16
 addItem c = do
   pool <- St.gets currentPool
   case lookupPool c pool of
-    Just i -> return i
+    Just i -> return (i+1)
     Nothing -> do
       let (pool', i) = appendPool c pool
       st <- St.get