From 761a5c1b494278928cdb6f50d6080d88164e91c2 Mon Sep 17 00:00:00 2001
From: Volker Berlin <volker.berlin@googlemail.com>
Date: Fri, 24 Mar 2017 22:43:27 +0100
Subject: [PATCH] Add operation code

---
 .../jwebassembly/module/ValueType.java        | 30 ++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/src/de/inetsoftware/jwebassembly/module/ValueType.java b/src/de/inetsoftware/jwebassembly/module/ValueType.java
index 3a79094..f9f1e06 100644
--- a/src/de/inetsoftware/jwebassembly/module/ValueType.java
+++ b/src/de/inetsoftware/jwebassembly/module/ValueType.java
@@ -19,8 +19,30 @@ package de.inetsoftware.jwebassembly.module;
  * @author Volker Berlin
  */
 public enum ValueType {
-    i32,
-    i64,
-    f32,
-    f64
+    i32(-1),
+    i64(-2),
+    f32(-3),
+    f64(-4),
+    func(-0x20);
+
+    private int code;
+
+    /**
+     * Create instance of the enum
+     * 
+     * @param code
+     *            the operation code in WebAssembly
+     */
+    private ValueType( int code ) {
+        this.code = code;
+    }
+
+    /**
+     * The operation code in WebAssembly.
+     * 
+     * @return the code
+     */
+    public int getCode() {
+        return code;
+    }
 }