From 79e3d9ad8e539f9f325c797dcc8d2af668ef15da Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Thu, 4 Dec 2014 11:48:04 -0800 Subject: [PATCH] Add stack map stubs. --- classfile/attributetypes.js | 1 + classfile/classfile.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/classfile/attributetypes.js b/classfile/attributetypes.js index 97e66fda..129bab5d 100644 --- a/classfile/attributetypes.js +++ b/classfile/attributetypes.js @@ -13,4 +13,5 @@ var ATTRIBUTE_TYPES = { LineNumberTable: "LineNumberTable", LocalVariableTable: "LocalVariableTable", Deprecated: "Deprecated", + StackMap: "StackMap" }; diff --git a/classfile/classfile.js b/classfile/classfile.js index 4ed1bd8c..7f1cbed8 100644 --- a/classfile/classfile.js +++ b/classfile/classfile.js @@ -101,6 +101,10 @@ var getClassImage = function(classBytes) { attribute.type = ATTRIBUTE_TYPES.Deprecated; return attribute; + case ATTRIBUTE_TYPES.StackMap: + attribute.type = ATTRIBUTE_TYPES.StackMap; + return attribute; + default: throw new Error("This attribute type is not supported yet. [" + JSON.stringify(item) + "]"); }