<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -78,8 +78,7 @@ public class ClassGen {
         cfw.startMethod(&quot;get&quot;, GET_STRING_SIGNATURE, PUBLIC_FINAL);
         int notFound = cfw.acquireLabel();
         generateIdSwitch(cfw, swtch, notFound, false, Method.GET);
-        if (notFound != -1)
-            cfw.markLabel(notFound);
+        cfw.markLabel(notFound);
         loadNotFound(cfw);
         cfw.add(ByteCode.ARETURN);
         cfw.stopMethod((short) 4);
@@ -303,13 +302,20 @@ public class ClassGen {
         cfw.markTableSwitchDefault(switchStart);
         cfw.add(ByteCode.GOTO, notFound);
         Case cs = swtch.firstcase;
-        // int index = 0;
+        int localNotFound = -1;
         for (int value = minValue; value &lt;= maxValue; value++)  {
-            cfw.markTableSwitchCase(switchStart, value - minValue);
             if (cs == null || cs.value != value) {
-                cfw.add(ByteCode.GOTO, notFound);
+                if (localNotFound == -1) {
+                    cfw.markTableSwitchCase(switchStart, value - minValue);
+                    localNotFound = cfw.getCurrentCodeOffset();
+                    cfw.add(ByteCode.GOTO, notFound);
+                } else {
+                    // reuse previously created code for unhandled case
+                    cfw.setTableSwitchJump(switchStart, value - minValue, localNotFound);
+                }
                 continue;
             } else {
+                cfw.markTableSwitchCase(switchStart, value - minValue);
                 if (cs.subswitch != null) {
                     generateIdSwitch(cfw, cs.subswitch, notFound, true, type);
                 } else {</diff>
      <filename>src/org/mozilla/javascript/adaptive/ClassGen.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9daab71dc1426f76b0b74c48beb18c57fbf7749b</id>
    </parent>
  </parents>
  <author>
    <name>Hannes Walln&#246;fer</name>
    <email>hannesw@gmail.com</email>
  </author>
  <url>http://github.com/hns/rhino-8/commit/d00e46306d2fec3fc71fde5eb64062c14881ee45</url>
  <id>d00e46306d2fec3fc71fde5eb64062c14881ee45</id>
  <committed-date>2009-11-03T02:58:08-08:00</committed-date>
  <authored-date>2009-11-03T02:58:08-08:00</authored-date>
  <message>Remove duplicate bytecode for unhandled switch cases</message>
  <tree>d037377970a62e23e0c4fec87f1de63c4bfefd04</tree>
  <committer>
    <name>Hannes Walln&#246;fer</name>
    <email>hannesw@gmail.com</email>
  </committer>
</commit>
