/projects/aspectj-1.6.9/aspectjtools1.6.9/org/aspectj/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus · Java · 1837 lines · 1175 code · 166 blank · 496 comment · 17 complexity · 916014de6302acef740fc2a413db573d MD5 · raw file

  1. /*******************************************************************************
  2. * Copyright (c) 2000, 2006 IBM Corporation and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * IBM Corporation - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.org.eclipse.jdt.internal.core.util;
  12. import org.aspectj.org.eclipse.jdt.core.Signature;
  13. import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
  14. import org.aspectj.org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
  15. import org.aspectj.org.eclipse.jdt.core.util.IBytecodeVisitor;
  16. import org.aspectj.org.eclipse.jdt.core.util.ICodeAttribute;
  17. import org.aspectj.org.eclipse.jdt.core.util.IConstantPoolConstant;
  18. import org.aspectj.org.eclipse.jdt.core.util.IConstantPoolEntry;
  19. import org.aspectj.org.eclipse.jdt.core.util.ILocalVariableAttribute;
  20. import org.aspectj.org.eclipse.jdt.core.util.ILocalVariableTableEntry;
  21. import org.aspectj.org.eclipse.jdt.core.util.IOpcodeMnemonics;
  22. import org.aspectj.org.eclipse.jdt.core.util.OpcodeStringValues;
  23. /**
  24. * Default implementation of ByteCodeVisitor
  25. */
  26. public class DefaultBytecodeVisitor implements IBytecodeVisitor {
  27. private static final String EMPTY_CLASS_NAME = "\"\""; //$NON-NLS-1$
  28. private static final String EMPTY_LOCAL_NAME = ""; //$NON-NLS-1$
  29. private static final int T_BOOLEAN = 4;
  30. private static final int T_CHAR = 5;
  31. private static final int T_FLOAT = 6;
  32. private static final int T_DOUBLE = 7;
  33. private static final int T_BYTE = 8;
  34. private static final int T_SHORT = 9;
  35. private static final int T_INT = 10;
  36. private static final int T_LONG = 11;
  37. private StringBuffer buffer;
  38. private String lineSeparator;
  39. private int tabNumber;
  40. private int digitNumberForPC;
  41. private ILocalVariableTableEntry[] localVariableTableEntries;
  42. private int localVariableAttributeLength;
  43. private int mode;
  44. public DefaultBytecodeVisitor(ICodeAttribute codeAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
  45. ILocalVariableAttribute localVariableAttribute = codeAttribute.getLocalVariableAttribute();
  46. this.localVariableAttributeLength = localVariableAttribute == null ? 0 : localVariableAttribute.getLocalVariableTableLength();
  47. if (this.localVariableAttributeLength != 0) {
  48. this.localVariableTableEntries = localVariableAttribute.getLocalVariableTable();
  49. } else {
  50. this.localVariableTableEntries = null;
  51. }
  52. this.buffer = buffer;
  53. this.lineSeparator = lineSeparator;
  54. this.tabNumber = tabNumber + 1;
  55. long codeLength = codeAttribute.getCodeLength();
  56. this.digitNumberForPC = Long.toString(codeLength).length();
  57. this.mode = mode;
  58. }
  59. /**
  60. * @see IBytecodeVisitor#_aaload(int)
  61. */
  62. public void _aaload(int pc) {
  63. dumpPcNumber(pc);
  64. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AALOAD]);
  65. writeNewLine();
  66. }
  67. private void dumpPcNumber(int pc) {
  68. writeTabs();
  69. int digitForPC = 1;
  70. if (pc != 0) {
  71. digitForPC = Integer.toString(pc).length();
  72. }
  73. for (int i = 0, max = this.digitNumberForPC - digitForPC; i < max; i++) {
  74. buffer.append(' ');
  75. }
  76. buffer.append(pc);
  77. buffer.append(Messages.disassembler_indentation);
  78. }
  79. /**
  80. * @see IBytecodeVisitor#_aastore(int)
  81. */
  82. public void _aastore(int pc) {
  83. dumpPcNumber(pc);
  84. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AASTORE]);
  85. writeNewLine();
  86. }
  87. /**
  88. * @see IBytecodeVisitor#_aconst_null(int)
  89. */
  90. public void _aconst_null(int pc) {
  91. dumpPcNumber(pc);
  92. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ACONST_NULL]);
  93. writeNewLine();
  94. }
  95. /**
  96. * @see IBytecodeVisitor#_aload_0(int)
  97. */
  98. public void _aload_0(int pc) {
  99. dumpPcNumber(pc);
  100. buffer.append(Messages.bind(Messages.classformat_load,
  101. new String[] {
  102. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_0],
  103. getLocalVariableName(pc, 0)
  104. }));
  105. writeNewLine();
  106. }
  107. /**
  108. * @see IBytecodeVisitor#_aload_1(int)
  109. */
  110. public void _aload_1(int pc) {
  111. dumpPcNumber(pc);
  112. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  113. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_1],
  114. getLocalVariableName(pc, 1)
  115. }));
  116. writeNewLine();
  117. }
  118. /**
  119. * @see IBytecodeVisitor#_aload_2(int)
  120. */
  121. public void _aload_2(int pc) {
  122. dumpPcNumber(pc);
  123. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  124. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_2],
  125. getLocalVariableName(pc, 2)
  126. }));
  127. writeNewLine();
  128. }
  129. /**
  130. * @see IBytecodeVisitor#_aload_3(int)
  131. */
  132. public void _aload_3(int pc) {
  133. dumpPcNumber(pc);
  134. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  135. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_3],
  136. getLocalVariableName(pc, 3)
  137. }));
  138. writeNewLine();
  139. }
  140. /**
  141. * @see IBytecodeVisitor#_aload(int, int)
  142. */
  143. public void _aload(int pc, int index) {
  144. dumpPcNumber(pc);
  145. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  146. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD],
  147. getLocalVariableName(pc, index, true)
  148. }));
  149. writeNewLine();
  150. }
  151. /**
  152. * @see IBytecodeVisitor#_anewarray(int, int, IConstantPoolEntry)
  153. */
  154. public void _anewarray(int pc, int index, IConstantPoolEntry constantClass) {
  155. dumpPcNumber(pc);
  156. buffer
  157. .append(Messages.bind(Messages.classformat_anewarray, new String[] {
  158. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ANEWARRAY],
  159. Integer.toString(index),
  160. returnConstantClassName(constantClass)
  161. }));
  162. writeNewLine();
  163. }
  164. /**
  165. * @see IBytecodeVisitor#_areturn(int)
  166. */
  167. public void _areturn(int pc) {
  168. dumpPcNumber(pc);
  169. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARETURN]);
  170. writeNewLine();
  171. }
  172. /**
  173. * @see IBytecodeVisitor#_arraylength(int)
  174. */
  175. public void _arraylength(int pc) {
  176. dumpPcNumber(pc);
  177. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARRAYLENGTH]);
  178. writeNewLine();
  179. }
  180. /**
  181. * @see IBytecodeVisitor#_astore_0(int)
  182. */
  183. public void _astore_0(int pc) {
  184. dumpPcNumber(pc);
  185. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  186. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_0],
  187. getLocalVariableName(pc, 0)
  188. }));
  189. writeNewLine();
  190. }
  191. /**
  192. * @see IBytecodeVisitor#_astore_1(int)
  193. */
  194. public void _astore_1(int pc) {
  195. dumpPcNumber(pc);
  196. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  197. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_1],
  198. getLocalVariableName(pc, 1)
  199. }));
  200. writeNewLine();
  201. }
  202. private String getLocalVariableName(int pc, int index) {
  203. return getLocalVariableName(pc, index, false);
  204. }
  205. private String getLocalVariableName(int pc, int index, boolean showIndex) {
  206. int nextPC = pc + 1;
  207. switch(index) {
  208. case 0 :
  209. case 1 :
  210. case 2 :
  211. case 3 :
  212. break;
  213. default :
  214. nextPC = index <= 255 ? pc + 2 : pc + 3;
  215. }
  216. for (int i = 0, max = this.localVariableAttributeLength; i < max; i++) {
  217. final ILocalVariableTableEntry entry = this.localVariableTableEntries[i];
  218. final int startPC = entry.getStartPC();
  219. if (entry.getIndex() == index && (startPC <= nextPC) && ((startPC + entry.getLength()) > nextPC)) {
  220. final StringBuffer stringBuffer = new StringBuffer();
  221. if (showIndex) {
  222. stringBuffer.append(' ').append(index);
  223. }
  224. stringBuffer.append(' ').append('[').append(entry.getName()).append(']');
  225. return String.valueOf(stringBuffer);
  226. }
  227. }
  228. if (showIndex) {
  229. final StringBuffer stringBuffer = new StringBuffer();
  230. stringBuffer.append(' ').append(index);
  231. return String.valueOf(stringBuffer);
  232. }
  233. return EMPTY_LOCAL_NAME;
  234. }
  235. /**
  236. * @see IBytecodeVisitor#_astore_2(int)
  237. */
  238. public void _astore_2(int pc) {
  239. dumpPcNumber(pc);
  240. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  241. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_2],
  242. getLocalVariableName(pc, 2)
  243. }));
  244. writeNewLine();
  245. }
  246. /**
  247. * @see IBytecodeVisitor#_astore_3(int)
  248. */
  249. public void _astore_3(int pc) {
  250. dumpPcNumber(pc);
  251. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  252. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_3],
  253. getLocalVariableName(pc, 3)
  254. }));
  255. writeNewLine();
  256. }
  257. /**
  258. * @see IBytecodeVisitor#_astore(int, int)
  259. */
  260. public void _astore(int pc, int index) {
  261. dumpPcNumber(pc);
  262. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  263. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE],
  264. getLocalVariableName(pc, index, true)
  265. }));
  266. writeNewLine();
  267. }
  268. /**
  269. * @see IBytecodeVisitor#_athrow(int)
  270. */
  271. public void _athrow(int pc) {
  272. dumpPcNumber(pc);
  273. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ATHROW]);
  274. writeNewLine();
  275. }
  276. /**
  277. * @see IBytecodeVisitor#_baload(int)
  278. */
  279. public void _baload(int pc) {
  280. dumpPcNumber(pc);
  281. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BALOAD]);
  282. writeNewLine();
  283. }
  284. /**
  285. * @see IBytecodeVisitor#_bastore(int)
  286. */
  287. public void _bastore(int pc) {
  288. dumpPcNumber(pc);
  289. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BASTORE]);
  290. writeNewLine();
  291. }
  292. /**
  293. * @see IBytecodeVisitor#_bipush(int, byte)
  294. */
  295. public void _bipush(int pc, byte _byte) {
  296. dumpPcNumber(pc);
  297. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BIPUSH])
  298. .append(Messages.disassembler_space)
  299. .append(_byte);
  300. writeNewLine();
  301. }
  302. /**
  303. * @see IBytecodeVisitor#_caload(int)
  304. */
  305. public void _caload(int pc) {
  306. dumpPcNumber(pc);
  307. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CALOAD]);
  308. writeNewLine();
  309. }
  310. /**
  311. * @see IBytecodeVisitor#_castore(int)
  312. */
  313. public void _castore(int pc) {
  314. dumpPcNumber(pc);
  315. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CASTORE]);
  316. writeNewLine();
  317. }
  318. /**
  319. * @see IBytecodeVisitor#_checkcast(int, int, IConstantPoolEntry)
  320. */
  321. public void _checkcast(int pc, int index, IConstantPoolEntry constantClass) {
  322. dumpPcNumber(pc);
  323. buffer
  324. .append(Messages.bind(Messages.classformat_checkcast, new String[] {
  325. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CHECKCAST],
  326. Integer.toString(index),
  327. returnConstantClassName(constantClass)
  328. }));
  329. writeNewLine();
  330. }
  331. /**
  332. * @see IBytecodeVisitor#_d2f(int)
  333. */
  334. public void _d2f(int pc) {
  335. dumpPcNumber(pc);
  336. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2F]);
  337. writeNewLine();
  338. }
  339. /**
  340. * @see IBytecodeVisitor#_d2i(int)
  341. */
  342. public void _d2i(int pc) {
  343. dumpPcNumber(pc);
  344. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2I]);
  345. writeNewLine();
  346. }
  347. /**
  348. * @see IBytecodeVisitor#_d2l(int)
  349. */
  350. public void _d2l(int pc) {
  351. dumpPcNumber(pc);
  352. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2L]);
  353. writeNewLine();
  354. }
  355. /**
  356. * @see IBytecodeVisitor#_dadd(int)
  357. */
  358. public void _dadd(int pc) {
  359. dumpPcNumber(pc);
  360. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DADD]);
  361. writeNewLine();
  362. }
  363. /**
  364. * @see IBytecodeVisitor#_daload(int)
  365. */
  366. public void _daload(int pc) {
  367. dumpPcNumber(pc);
  368. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DALOAD]);
  369. writeNewLine();
  370. }
  371. /**
  372. * @see IBytecodeVisitor#_dastore(int)
  373. */
  374. public void _dastore(int pc) {
  375. dumpPcNumber(pc);
  376. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DASTORE]);
  377. writeNewLine();
  378. }
  379. /**
  380. * @see IBytecodeVisitor#_dcmpg(int)
  381. */
  382. public void _dcmpg(int pc) {
  383. dumpPcNumber(pc);
  384. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPG]);
  385. writeNewLine();
  386. }
  387. /**
  388. * @see IBytecodeVisitor#_dcmpl(int)
  389. */
  390. public void _dcmpl(int pc) {
  391. dumpPcNumber(pc);
  392. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPL]);
  393. writeNewLine();
  394. }
  395. /**
  396. * @see IBytecodeVisitor#_dconst_0(int)
  397. */
  398. public void _dconst_0(int pc) {
  399. dumpPcNumber(pc);
  400. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_0]);
  401. writeNewLine();
  402. }
  403. /**
  404. * @see IBytecodeVisitor#_dconst_1(int)
  405. */
  406. public void _dconst_1(int pc) {
  407. dumpPcNumber(pc);
  408. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_1]);
  409. writeNewLine();
  410. }
  411. /**
  412. * @see IBytecodeVisitor#_ddiv(int)
  413. */
  414. public void _ddiv(int pc) {
  415. dumpPcNumber(pc);
  416. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DDIV]);
  417. writeNewLine();
  418. }
  419. /**
  420. * @see IBytecodeVisitor#_dload_0(int)
  421. */
  422. public void _dload_0(int pc) {
  423. dumpPcNumber(pc);
  424. buffer.append(Messages.bind(Messages.classformat_load,new String[] {
  425. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_0],
  426. getLocalVariableName(pc, 0)
  427. }));
  428. writeNewLine();
  429. }
  430. /**
  431. * @see IBytecodeVisitor#_dload_1(int)
  432. */
  433. public void _dload_1(int pc) {
  434. dumpPcNumber(pc);
  435. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  436. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_1],
  437. getLocalVariableName(pc, 1)
  438. }));
  439. writeNewLine();
  440. }
  441. /**
  442. * @see IBytecodeVisitor#_dload_2(int)
  443. */
  444. public void _dload_2(int pc) {
  445. dumpPcNumber(pc);
  446. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  447. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_2],
  448. getLocalVariableName(pc, 2)
  449. }));
  450. writeNewLine();
  451. }
  452. /**
  453. * @see IBytecodeVisitor#_dload_3(int)
  454. */
  455. public void _dload_3(int pc) {
  456. dumpPcNumber(pc);
  457. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  458. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_3],
  459. getLocalVariableName(pc, 3)
  460. }));
  461. writeNewLine();
  462. }
  463. /**
  464. * @see IBytecodeVisitor#_dload(int, int)
  465. */
  466. public void _dload(int pc, int index) {
  467. dumpPcNumber(pc);
  468. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  469. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD],
  470. getLocalVariableName(pc, index, true)
  471. }));
  472. writeNewLine();
  473. }
  474. /**
  475. * @see IBytecodeVisitor#_dmul(int)
  476. */
  477. public void _dmul(int pc) {
  478. dumpPcNumber(pc);
  479. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DMUL]);
  480. writeNewLine();
  481. }
  482. /**
  483. * @see IBytecodeVisitor#_dneg(int)
  484. */
  485. public void _dneg(int pc) {
  486. dumpPcNumber(pc);
  487. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DNEG]);
  488. writeNewLine();
  489. }
  490. /**
  491. * @see IBytecodeVisitor#_drem(int)
  492. */
  493. public void _drem(int pc) {
  494. dumpPcNumber(pc);
  495. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DREM]);
  496. writeNewLine();
  497. }
  498. /**
  499. * @see IBytecodeVisitor#_dreturn(int)
  500. */
  501. public void _dreturn(int pc) {
  502. dumpPcNumber(pc);
  503. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DRETURN]);
  504. writeNewLine();
  505. }
  506. /**
  507. * @see IBytecodeVisitor#_dstore_0(int)
  508. */
  509. public void _dstore_0(int pc) {
  510. dumpPcNumber(pc);
  511. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  512. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_0],
  513. getLocalVariableName(pc, 0)
  514. }));
  515. writeNewLine();
  516. }
  517. /**
  518. * @see IBytecodeVisitor#_dstore_1(int)
  519. */
  520. public void _dstore_1(int pc) {
  521. dumpPcNumber(pc);
  522. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  523. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_1],
  524. getLocalVariableName(pc, 1)
  525. }));
  526. writeNewLine();
  527. }
  528. /**
  529. * @see IBytecodeVisitor#_dstore_2(int)
  530. */
  531. public void _dstore_2(int pc) {
  532. dumpPcNumber(pc);
  533. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  534. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_2],
  535. getLocalVariableName(pc, 2)
  536. }));
  537. writeNewLine();
  538. }
  539. /**
  540. * @see IBytecodeVisitor#_dstore_3(int)
  541. */
  542. public void _dstore_3(int pc) {
  543. dumpPcNumber(pc);
  544. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  545. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_3],
  546. getLocalVariableName(pc, 3)
  547. }));
  548. writeNewLine();
  549. }
  550. /**
  551. * @see IBytecodeVisitor#_dstore(int,int)
  552. */
  553. public void _dstore(int pc, int index) {
  554. dumpPcNumber(pc);
  555. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  556. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE],
  557. getLocalVariableName(pc, index, true)
  558. }));
  559. writeNewLine();
  560. }
  561. /**
  562. * @see IBytecodeVisitor#_dsub(int)
  563. */
  564. public void _dsub(int pc) {
  565. dumpPcNumber(pc);
  566. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSUB]);
  567. writeNewLine();
  568. }
  569. /**
  570. * @see IBytecodeVisitor#_dup_x1(int)
  571. */
  572. public void _dup_x1(int pc) {
  573. dumpPcNumber(pc);
  574. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X1]);
  575. writeNewLine();
  576. }
  577. /**
  578. * @see IBytecodeVisitor#_dup_x2(int)
  579. */
  580. public void _dup_x2(int pc) {
  581. dumpPcNumber(pc);
  582. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X2]);
  583. writeNewLine();
  584. }
  585. /**
  586. * @see IBytecodeVisitor#_dup(int)
  587. */
  588. public void _dup(int pc) {
  589. dumpPcNumber(pc);
  590. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP]);
  591. writeNewLine();
  592. }
  593. /**
  594. * @see IBytecodeVisitor#_dup2_x1(int)
  595. */
  596. public void _dup2_x1(int pc) {
  597. dumpPcNumber(pc);
  598. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X1]);
  599. writeNewLine();
  600. }
  601. /**
  602. * @see IBytecodeVisitor#_dup2_x2(int)
  603. */
  604. public void _dup2_x2(int pc) {
  605. dumpPcNumber(pc);
  606. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X2]);
  607. writeNewLine();
  608. }
  609. /**
  610. * @see IBytecodeVisitor#_dup2(int)
  611. */
  612. public void _dup2(int pc) {
  613. dumpPcNumber(pc);
  614. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2]);
  615. writeNewLine();
  616. }
  617. /**
  618. * @see IBytecodeVisitor#_f2d(int)
  619. */
  620. public void _f2d(int pc) {
  621. dumpPcNumber(pc);
  622. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2D]);
  623. writeNewLine();
  624. }
  625. /**
  626. * @see IBytecodeVisitor#_f2i(int)
  627. */
  628. public void _f2i(int pc) {
  629. dumpPcNumber(pc);
  630. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2I]);
  631. writeNewLine();
  632. }
  633. /**
  634. * @see IBytecodeVisitor#_f2l(int)
  635. */
  636. public void _f2l(int pc) {
  637. dumpPcNumber(pc);
  638. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2L]);
  639. writeNewLine();
  640. }
  641. /**
  642. * @see IBytecodeVisitor#_fadd(int)
  643. */
  644. public void _fadd(int pc) {
  645. dumpPcNumber(pc);
  646. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FADD]);
  647. writeNewLine();
  648. }
  649. /**
  650. * @see IBytecodeVisitor#_faload(int)
  651. */
  652. public void _faload(int pc) {
  653. dumpPcNumber(pc);
  654. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FALOAD]);
  655. writeNewLine();
  656. }
  657. /**
  658. * @see IBytecodeVisitor#_fastore(int)
  659. */
  660. public void _fastore(int pc) {
  661. dumpPcNumber(pc);
  662. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FASTORE]);
  663. writeNewLine();
  664. }
  665. /**
  666. * @see IBytecodeVisitor#_fcmpg(int)
  667. */
  668. public void _fcmpg(int pc) {
  669. dumpPcNumber(pc);
  670. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPG]);
  671. writeNewLine();
  672. }
  673. /**
  674. * @see IBytecodeVisitor#_fcmpl(int)
  675. */
  676. public void _fcmpl(int pc) {
  677. dumpPcNumber(pc);
  678. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPL]);
  679. writeNewLine();
  680. }
  681. /**
  682. * @see IBytecodeVisitor#_fconst_0(int)
  683. */
  684. public void _fconst_0(int pc) {
  685. dumpPcNumber(pc);
  686. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_0]);
  687. writeNewLine();
  688. }
  689. /**
  690. * @see IBytecodeVisitor#_fconst_1(int)
  691. */
  692. public void _fconst_1(int pc) {
  693. dumpPcNumber(pc);
  694. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_1]);
  695. writeNewLine();
  696. }
  697. /**
  698. * @see IBytecodeVisitor#_fconst_2(int)
  699. */
  700. public void _fconst_2(int pc) {
  701. dumpPcNumber(pc);
  702. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_2]);
  703. writeNewLine();
  704. }
  705. /**
  706. * @see IBytecodeVisitor#_fdiv(int)
  707. */
  708. public void _fdiv(int pc) {
  709. dumpPcNumber(pc);
  710. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FDIV]);
  711. writeNewLine();
  712. }
  713. /**
  714. * @see IBytecodeVisitor#_fload_0(int)
  715. */
  716. public void _fload_0(int pc) {
  717. dumpPcNumber(pc);
  718. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  719. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_0],
  720. getLocalVariableName(pc, 0)
  721. }));
  722. writeNewLine();
  723. }
  724. /**
  725. * @see IBytecodeVisitor#_fload_1(int)
  726. */
  727. public void _fload_1(int pc) {
  728. dumpPcNumber(pc);
  729. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  730. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_1],
  731. getLocalVariableName(pc, 1)
  732. }));
  733. writeNewLine();
  734. }
  735. /**
  736. * @see IBytecodeVisitor#_fload_2(int)
  737. */
  738. public void _fload_2(int pc) {
  739. dumpPcNumber(pc);
  740. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  741. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_2],
  742. getLocalVariableName(pc, 2)
  743. }));
  744. writeNewLine();
  745. }
  746. /**
  747. * @see IBytecodeVisitor#_fload_3(int)
  748. */
  749. public void _fload_3(int pc) {
  750. dumpPcNumber(pc);
  751. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  752. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_3],
  753. getLocalVariableName(pc, 3)
  754. }));
  755. writeNewLine();
  756. }
  757. /**
  758. * @see IBytecodeVisitor#_fload(int, int)
  759. */
  760. public void _fload(int pc, int index) {
  761. dumpPcNumber(pc);
  762. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  763. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD],
  764. getLocalVariableName(pc, index, true)
  765. }));
  766. writeNewLine();
  767. }
  768. /**
  769. * @see IBytecodeVisitor#_fmul(int)
  770. */
  771. public void _fmul(int pc) {
  772. dumpPcNumber(pc);
  773. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FMUL]);
  774. writeNewLine();
  775. }
  776. /**
  777. * @see IBytecodeVisitor#_fneg(int)
  778. */
  779. public void _fneg(int pc) {
  780. dumpPcNumber(pc);
  781. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FNEG]);
  782. writeNewLine();
  783. }
  784. /**
  785. * @see IBytecodeVisitor#_frem(int)
  786. */
  787. public void _frem(int pc) {
  788. dumpPcNumber(pc);
  789. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FREM]);
  790. writeNewLine();
  791. }
  792. /**
  793. * @see IBytecodeVisitor#_freturn(int)
  794. */
  795. public void _freturn(int pc) {
  796. dumpPcNumber(pc);
  797. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FRETURN]);
  798. writeNewLine();
  799. }
  800. /**
  801. * @see IBytecodeVisitor#_fstore_0(int)
  802. */
  803. public void _fstore_0(int pc) {
  804. dumpPcNumber(pc);
  805. buffer.append(Messages.bind(Messages.classformat_store,new String[] {
  806. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_0],
  807. getLocalVariableName(pc, 0)
  808. }));
  809. writeNewLine();
  810. }
  811. /**
  812. * @see IBytecodeVisitor#_fstore_1(int)
  813. */
  814. public void _fstore_1(int pc) {
  815. dumpPcNumber(pc);
  816. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  817. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_1],
  818. getLocalVariableName(pc, 1)
  819. }));
  820. writeNewLine();
  821. }
  822. /**
  823. * @see IBytecodeVisitor#_fstore_2(int)
  824. */
  825. public void _fstore_2(int pc) {
  826. dumpPcNumber(pc);
  827. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  828. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_2],
  829. getLocalVariableName(pc, 2)
  830. }));
  831. writeNewLine();
  832. }
  833. /**
  834. * @see IBytecodeVisitor#_fstore_3(int)
  835. */
  836. public void _fstore_3(int pc) {
  837. dumpPcNumber(pc);
  838. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  839. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_3],
  840. getLocalVariableName(pc, 3)
  841. }));
  842. writeNewLine();
  843. }
  844. /**
  845. * @see IBytecodeVisitor#_fstore(int, int)
  846. */
  847. public void _fstore(int pc, int index) {
  848. dumpPcNumber(pc);
  849. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  850. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE],
  851. getLocalVariableName(pc, index, true)
  852. }));
  853. writeNewLine();
  854. }
  855. /**
  856. * @see IBytecodeVisitor#_fsub(int)
  857. */
  858. public void _fsub(int pc) {
  859. dumpPcNumber(pc);
  860. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSUB]);
  861. writeNewLine();
  862. }
  863. /**
  864. * @see IBytecodeVisitor#_getfield(int, int, IConstantPoolEntry)
  865. */
  866. public void _getfield(int pc, int index, IConstantPoolEntry constantFieldref) {
  867. dumpPcNumber(pc);
  868. buffer.append(Messages.bind(Messages.classformat_getfield, new String[] {
  869. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETFIELD],
  870. Integer.toString(index),
  871. returnDeclaringClassName(constantFieldref),
  872. new String(constantFieldref.getFieldName()),
  873. returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))
  874. }));
  875. writeNewLine();
  876. }
  877. /**
  878. * @see IBytecodeVisitor#_getstatic(int, int, IConstantPoolEntry)
  879. */
  880. public void _getstatic(int pc, int index, IConstantPoolEntry constantFieldref) {
  881. dumpPcNumber(pc);
  882. buffer.append(Messages.bind(Messages.classformat_getstatic, new String[] {
  883. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETSTATIC],
  884. Integer.toString(index),
  885. returnDeclaringClassName(constantFieldref),
  886. new String(constantFieldref.getFieldName()),
  887. returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))
  888. }));
  889. writeNewLine();
  890. }
  891. /**
  892. * @see IBytecodeVisitor#_goto_w(int, int)
  893. */
  894. public void _goto_w(int pc, int branchOffset) {
  895. dumpPcNumber(pc);
  896. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO_W])
  897. .append(Messages.disassembler_space)
  898. .append(branchOffset + pc);
  899. writeNewLine();
  900. }
  901. /**
  902. * @see IBytecodeVisitor#_goto(int, int)
  903. */
  904. public void _goto(int pc, int branchOffset) {
  905. dumpPcNumber(pc);
  906. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO])
  907. .append(Messages.disassembler_space)
  908. .append(branchOffset + pc);
  909. writeNewLine();
  910. }
  911. /**
  912. * @see IBytecodeVisitor#_i2b(int)
  913. */
  914. public void _i2b(int pc) {
  915. dumpPcNumber(pc);
  916. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2B]);
  917. writeNewLine();
  918. }
  919. /**
  920. * @see IBytecodeVisitor#_i2c(int)
  921. */
  922. public void _i2c(int pc) {
  923. dumpPcNumber(pc);
  924. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2C]);
  925. writeNewLine();
  926. }
  927. /**
  928. * @see IBytecodeVisitor#_i2d(int)
  929. */
  930. public void _i2d(int pc) {
  931. dumpPcNumber(pc);
  932. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2D]);
  933. writeNewLine();
  934. }
  935. /**
  936. * @see IBytecodeVisitor#_i2f(int)
  937. */
  938. public void _i2f(int pc) {
  939. dumpPcNumber(pc);
  940. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2F]);
  941. writeNewLine();
  942. }
  943. /**
  944. * @see IBytecodeVisitor#_i2l(int)
  945. */
  946. public void _i2l(int pc) {
  947. dumpPcNumber(pc);
  948. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2L]);
  949. writeNewLine();
  950. }
  951. /**
  952. * @see IBytecodeVisitor#_i2s(int)
  953. */
  954. public void _i2s(int pc) {
  955. dumpPcNumber(pc);
  956. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2S]);
  957. writeNewLine();
  958. }
  959. /**
  960. * @see IBytecodeVisitor#_iadd(int)
  961. */
  962. public void _iadd(int pc) {
  963. dumpPcNumber(pc);
  964. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IADD]);
  965. writeNewLine();
  966. }
  967. /**
  968. * @see IBytecodeVisitor#_iaload(int)
  969. */
  970. public void _iaload(int pc) {
  971. dumpPcNumber(pc);
  972. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IALOAD]);
  973. writeNewLine();
  974. }
  975. /**
  976. * @see IBytecodeVisitor#_iand(int)
  977. */
  978. public void _iand(int pc) {
  979. dumpPcNumber(pc);
  980. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IAND]);
  981. writeNewLine();
  982. }
  983. /**
  984. * @see IBytecodeVisitor#_iastore(int)
  985. */
  986. public void _iastore(int pc) {
  987. dumpPcNumber(pc);
  988. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IASTORE]);
  989. writeNewLine();
  990. }
  991. /**
  992. * @see IBytecodeVisitor#_if_acmpeq(int, int)
  993. */
  994. public void _if_acmpeq(int pc, int branchOffset) {
  995. dumpPcNumber(pc);
  996. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPEQ])
  997. .append(Messages.disassembler_space)
  998. .append(branchOffset + pc);
  999. writeNewLine();
  1000. }
  1001. /**
  1002. * @see IBytecodeVisitor#_if_acmpne(int, int)
  1003. */
  1004. public void _if_acmpne(int pc, int branchOffset) {
  1005. dumpPcNumber(pc);
  1006. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPNE])
  1007. .append(Messages.disassembler_space)
  1008. .append(branchOffset + pc);
  1009. writeNewLine();
  1010. }
  1011. /**
  1012. * @see IBytecodeVisitor#_if_icmpeq(int, int)
  1013. */
  1014. public void _if_icmpeq(int pc, int branchOffset) {
  1015. dumpPcNumber(pc);
  1016. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPEQ])
  1017. .append(Messages.disassembler_space)
  1018. .append(branchOffset + pc);
  1019. writeNewLine();
  1020. }
  1021. /**
  1022. * @see IBytecodeVisitor#_if_icmpge(int, int)
  1023. */
  1024. public void _if_icmpge(int pc, int branchOffset) {
  1025. dumpPcNumber(pc);
  1026. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGE])
  1027. .append(Messages.disassembler_space)
  1028. .append(branchOffset + pc);
  1029. writeNewLine();
  1030. }
  1031. /**
  1032. * @see IBytecodeVisitor#_if_icmpgt(int, int)
  1033. */
  1034. public void _if_icmpgt(int pc, int branchOffset) {
  1035. dumpPcNumber(pc);
  1036. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGT])
  1037. .append(Messages.disassembler_space)
  1038. .append(branchOffset + pc);
  1039. writeNewLine();
  1040. }
  1041. /**
  1042. * @see IBytecodeVisitor#_if_icmple(int, int)
  1043. */
  1044. public void _if_icmple(int pc, int branchOffset) {
  1045. dumpPcNumber(pc);
  1046. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLE])
  1047. .append(Messages.disassembler_space)
  1048. .append(branchOffset + pc);
  1049. writeNewLine();
  1050. }
  1051. /**
  1052. * @see IBytecodeVisitor#_if_icmplt(int, int)
  1053. */
  1054. public void _if_icmplt(int pc, int branchOffset) {
  1055. dumpPcNumber(pc);
  1056. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLT])
  1057. .append(Messages.disassembler_space)
  1058. .append(branchOffset + pc);
  1059. writeNewLine();
  1060. }
  1061. /**
  1062. * @see IBytecodeVisitor#_if_icmpne(int, int)
  1063. */
  1064. public void _if_icmpne(int pc, int branchOffset) {
  1065. dumpPcNumber(pc);
  1066. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPNE])
  1067. .append(Messages.disassembler_space)
  1068. .append(branchOffset + pc);
  1069. writeNewLine();
  1070. }
  1071. /**
  1072. * @see IBytecodeVisitor#_iconst_0(int)
  1073. */
  1074. public void _iconst_0(int pc) {
  1075. dumpPcNumber(pc);
  1076. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_0]);
  1077. writeNewLine();
  1078. }
  1079. /**
  1080. * @see IBytecodeVisitor#_iconst_1(int)
  1081. */
  1082. public void _iconst_1(int pc) {
  1083. dumpPcNumber(pc);
  1084. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_1]);
  1085. writeNewLine();
  1086. }
  1087. /**
  1088. * @see IBytecodeVisitor#_iconst_2(int)
  1089. */
  1090. public void _iconst_2(int pc) {
  1091. dumpPcNumber(pc);
  1092. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_2]);
  1093. writeNewLine();
  1094. }
  1095. /**
  1096. * @see IBytecodeVisitor#_iconst_3(int)
  1097. */
  1098. public void _iconst_3(int pc) {
  1099. dumpPcNumber(pc);
  1100. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_3]);
  1101. writeNewLine();
  1102. }
  1103. /**
  1104. * @see IBytecodeVisitor#_iconst_4(int)
  1105. */
  1106. public void _iconst_4(int pc) {
  1107. dumpPcNumber(pc);
  1108. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_4]);
  1109. writeNewLine();
  1110. }
  1111. /**
  1112. * @see IBytecodeVisitor#_iconst_5(int)
  1113. */
  1114. public void _iconst_5(int pc) {
  1115. dumpPcNumber(pc);
  1116. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_5]);
  1117. writeNewLine();
  1118. }
  1119. /**
  1120. * @see IBytecodeVisitor#_iconst_m1(int)
  1121. */
  1122. public void _iconst_m1(int pc) {
  1123. dumpPcNumber(pc);
  1124. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_M1]);
  1125. writeNewLine();
  1126. }
  1127. /**
  1128. * @see IBytecodeVisitor#_idiv(int)
  1129. */
  1130. public void _idiv(int pc) {
  1131. dumpPcNumber(pc);
  1132. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IDIV]);
  1133. writeNewLine();
  1134. }
  1135. /**
  1136. * @see IBytecodeVisitor#_ifeq(int, int)
  1137. */
  1138. public void _ifeq(int pc, int branchOffset) {
  1139. dumpPcNumber(pc);
  1140. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFEQ])
  1141. .append(Messages.disassembler_space)
  1142. .append(branchOffset + pc);
  1143. writeNewLine();
  1144. }
  1145. /**
  1146. * @see IBytecodeVisitor#_ifge(int, int)
  1147. */
  1148. public void _ifge(int pc, int branchOffset) {
  1149. dumpPcNumber(pc);
  1150. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGE])
  1151. .append(Messages.disassembler_space)
  1152. .append(branchOffset + pc);
  1153. writeNewLine();
  1154. }
  1155. /**
  1156. * @see IBytecodeVisitor#_ifgt(int, int)
  1157. */
  1158. public void _ifgt(int pc, int branchOffset) {
  1159. dumpPcNumber(pc);
  1160. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGT])
  1161. .append(Messages.disassembler_space)
  1162. .append(branchOffset + pc);
  1163. writeNewLine();
  1164. }
  1165. /**
  1166. * @see IBytecodeVisitor#_ifle(int, int)
  1167. */
  1168. public void _ifle(int pc, int branchOffset) {
  1169. dumpPcNumber(pc);
  1170. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLE])
  1171. .append(Messages.disassembler_space)
  1172. .append(branchOffset + pc);
  1173. writeNewLine();
  1174. }
  1175. /**
  1176. * @see IBytecodeVisitor#_iflt(int, int)
  1177. */
  1178. public void _iflt(int pc, int branchOffset) {
  1179. dumpPcNumber(pc);
  1180. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLT])
  1181. .append(Messages.disassembler_space)
  1182. .append(branchOffset + pc);
  1183. writeNewLine();
  1184. }
  1185. /**
  1186. * @see IBytecodeVisitor#_ifne(int, int)
  1187. */
  1188. public void _ifne(int pc, int branchOffset) {
  1189. dumpPcNumber(pc);
  1190. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNE])
  1191. .append(Messages.disassembler_space)
  1192. .append(branchOffset + pc);
  1193. writeNewLine();
  1194. }
  1195. /**
  1196. * @see IBytecodeVisitor#_ifnonnull(int, int)
  1197. */
  1198. public void _ifnonnull(int pc, int branchOffset) {
  1199. dumpPcNumber(pc);
  1200. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNONNULL])
  1201. .append(Messages.disassembler_space)
  1202. .append(branchOffset + pc);
  1203. writeNewLine();
  1204. }
  1205. /**
  1206. * @see IBytecodeVisitor#_ifnull(int, int)
  1207. */
  1208. public void _ifnull(int pc, int branchOffset) {
  1209. dumpPcNumber(pc);
  1210. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNULL])
  1211. .append(Messages.disassembler_space)
  1212. .append(branchOffset + pc);
  1213. writeNewLine();
  1214. }
  1215. /**
  1216. * @see IBytecodeVisitor#_iinc(int, int, int)
  1217. */
  1218. public void _iinc(int pc, int index, int _const) {
  1219. dumpPcNumber(pc);
  1220. buffer.append(Messages.bind(Messages.classformat_iinc, new String[] {
  1221. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IINC],
  1222. Integer.toString(index),
  1223. Integer.toString(_const),
  1224. getLocalVariableName(pc, index, false)
  1225. }));
  1226. writeNewLine();
  1227. }
  1228. /**
  1229. * @see IBytecodeVisitor#_iload_0(int)
  1230. */
  1231. public void _iload_0(int pc) {
  1232. dumpPcNumber(pc);
  1233. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  1234. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_0],
  1235. getLocalVariableName(pc, 0)
  1236. }));
  1237. writeNewLine();
  1238. }
  1239. /**
  1240. * @see IBytecodeVisitor#_iload_1(int)
  1241. */
  1242. public void _iload_1(int pc) {
  1243. dumpPcNumber(pc);
  1244. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  1245. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_1],
  1246. getLocalVariableName(pc, 1)
  1247. }));
  1248. writeNewLine();
  1249. }
  1250. /**
  1251. * @see IBytecodeVisitor#_iload_2(int)
  1252. */
  1253. public void _iload_2(int pc) {
  1254. dumpPcNumber(pc);
  1255. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  1256. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_2],
  1257. getLocalVariableName(pc, 2)
  1258. }));
  1259. writeNewLine();
  1260. }
  1261. /**
  1262. * @see IBytecodeVisitor#_iload_3(int)
  1263. */
  1264. public void _iload_3(int pc) {
  1265. dumpPcNumber(pc);
  1266. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  1267. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_3],
  1268. getLocalVariableName(pc, 3)
  1269. }));
  1270. writeNewLine();
  1271. }
  1272. /**
  1273. * @see IBytecodeVisitor#_iload(int, int)
  1274. */
  1275. public void _iload(int pc, int index) {
  1276. dumpPcNumber(pc);
  1277. buffer.append(Messages.bind(Messages.classformat_load, new String[] {
  1278. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD],
  1279. getLocalVariableName(pc, index, true)
  1280. }));
  1281. writeNewLine();
  1282. }
  1283. /**
  1284. * @see IBytecodeVisitor#_imul(int)
  1285. */
  1286. public void _imul(int pc) {
  1287. dumpPcNumber(pc);
  1288. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMUL]);
  1289. writeNewLine();
  1290. }
  1291. /**
  1292. * @see IBytecodeVisitor#_ineg(int)
  1293. */
  1294. public void _ineg(int pc) {
  1295. dumpPcNumber(pc);
  1296. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INEG]);
  1297. writeNewLine();
  1298. }
  1299. /**
  1300. * @see IBytecodeVisitor#_instanceof(int, int, IConstantPoolEntry)
  1301. */
  1302. public void _instanceof(int pc, int index, IConstantPoolEntry constantClass) {
  1303. dumpPcNumber(pc);
  1304. buffer.append(Messages.bind(Messages.classformat_instanceof, new String[] {
  1305. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INSTANCEOF],
  1306. Integer.toString(index),
  1307. returnConstantClassName(constantClass)
  1308. }));
  1309. writeNewLine();
  1310. }
  1311. /**
  1312. * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
  1313. */
  1314. public void _invokeinterface(
  1315. int pc,
  1316. int index,
  1317. byte nargs,
  1318. IConstantPoolEntry constantInterfaceMethodref) {
  1319. dumpPcNumber(pc);
  1320. buffer.append(Messages.bind(Messages.classformat_invokeinterface, new String[] {
  1321. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEINTERFACE],
  1322. Integer.toString(index),
  1323. Integer.toString(nargs),
  1324. Util.toString(
  1325. constantInterfaceMethodref.getClassName(),
  1326. constantInterfaceMethodref.getMethodName(),
  1327. constantInterfaceMethodref.getMethodDescriptor(),
  1328. true,
  1329. isCompact())
  1330. }));
  1331. writeNewLine();
  1332. }
  1333. /**
  1334. * @see IBytecodeVisitor#_invokespecial(int, int, IConstantPoolEntry)
  1335. */
  1336. public void _invokespecial(int pc, int index, IConstantPoolEntry constantMethodref) {
  1337. dumpPcNumber(pc);
  1338. final String signature = returnMethodSignature(constantMethodref);
  1339. buffer.append(Messages.bind(Messages.classformat_invokespecial, new String[] {
  1340. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESPECIAL],
  1341. Integer.toString(index),
  1342. signature
  1343. }));
  1344. writeNewLine();
  1345. }
  1346. /**
  1347. * @see IBytecodeVisitor#_invokestatic(int, int, IConstantPoolEntry)
  1348. */
  1349. public void _invokestatic(int pc, int index, IConstantPoolEntry constantMethodref) {
  1350. dumpPcNumber(pc);
  1351. final String signature = returnMethodSignature(constantMethodref);
  1352. buffer.append(Messages.bind(Messages.classformat_invokestatic, new String[] {
  1353. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESTATIC],
  1354. Integer.toString(index),
  1355. signature
  1356. }));
  1357. writeNewLine();
  1358. }
  1359. /**
  1360. * @see IBytecodeVisitor#_invokevirtual(int, int, IConstantPoolEntry)
  1361. */
  1362. public void _invokevirtual(int pc, int index, IConstantPoolEntry constantMethodref) {
  1363. dumpPcNumber(pc);
  1364. final String signature = returnMethodSignature(constantMethodref);
  1365. buffer.append(Messages.bind(Messages.classformat_invokevirtual,new String[] {
  1366. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEVIRTUAL],
  1367. Integer.toString(index),
  1368. signature
  1369. }));
  1370. writeNewLine();
  1371. }
  1372. /**
  1373. * @see IBytecodeVisitor#_ior(int)
  1374. */
  1375. public void _ior(int pc) {
  1376. dumpPcNumber(pc);
  1377. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IOR]);
  1378. writeNewLine();
  1379. }
  1380. /**
  1381. * @see IBytecodeVisitor#_irem(int)
  1382. */
  1383. public void _irem(int pc) {
  1384. dumpPcNumber(pc);
  1385. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IREM]);
  1386. writeNewLine();
  1387. }
  1388. /**
  1389. * @see IBytecodeVisitor#_ireturn(int)
  1390. */
  1391. public void _ireturn(int pc) {
  1392. dumpPcNumber(pc);
  1393. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IRETURN]);
  1394. writeNewLine();
  1395. }
  1396. /**
  1397. * @see IBytecodeVisitor#_ishl(int)
  1398. */
  1399. public void _ishl(int pc) {
  1400. dumpPcNumber(pc);
  1401. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHL]);
  1402. writeNewLine();
  1403. }
  1404. /**
  1405. * @see IBytecodeVisitor#_ishr(int)
  1406. */
  1407. public void _ishr(int pc) {
  1408. dumpPcNumber(pc);
  1409. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHR]);
  1410. writeNewLine();
  1411. }
  1412. /**
  1413. * @see IBytecodeVisitor#_istore_0(int)
  1414. */
  1415. public void _istore_0(int pc) {
  1416. dumpPcNumber(pc);
  1417. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  1418. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_0],
  1419. getLocalVariableName(pc, 0)
  1420. }));
  1421. writeNewLine();
  1422. }
  1423. /**
  1424. * @see IBytecodeVisitor#_istore_1(int)
  1425. */
  1426. public void _istore_1(int pc) {
  1427. dumpPcNumber(pc);
  1428. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  1429. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_1],
  1430. getLocalVariableName(pc, 1)
  1431. }));
  1432. writeNewLine();
  1433. }
  1434. /**
  1435. * @see IBytecodeVisitor#_istore_2(int)
  1436. */
  1437. public void _istore_2(int pc) {
  1438. dumpPcNumber(pc);
  1439. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  1440. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_2],
  1441. getLocalVariableName(pc, 2)
  1442. }));
  1443. writeNewLine();
  1444. }
  1445. /**
  1446. * @see IBytecodeVisitor#_istore_3(int)
  1447. */
  1448. public void _istore_3(int pc) {
  1449. dumpPcNumber(pc);
  1450. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  1451. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_3],
  1452. getLocalVariableName(pc, 3)
  1453. }));
  1454. writeNewLine();
  1455. }
  1456. /**
  1457. * @see IBytecodeVisitor#_istore(int, int)
  1458. */
  1459. public void _istore(int pc, int index) {
  1460. dumpPcNumber(pc);
  1461. buffer.append(Messages.bind(Messages.classformat_store, new String[] {
  1462. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE],
  1463. getLocalVariableName(pc, index, true)
  1464. }));
  1465. writeNewLine();
  1466. }
  1467. /**
  1468. * @see IBytecodeVisitor#_isub(int)
  1469. */
  1470. public void _isub(int pc) {
  1471. dumpPcNumber(pc);
  1472. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISUB]);
  1473. writeNewLine();
  1474. }
  1475. /**
  1476. * @see IBytecodeVisitor#_iushr(int)
  1477. */
  1478. public void _iushr(int pc) {
  1479. dumpPcNumber(pc);
  1480. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IUSHR]);
  1481. writeNewLine();
  1482. }
  1483. /**
  1484. * @see IBytecodeVisitor#_ixor(int)
  1485. */
  1486. public void _ixor(int pc) {
  1487. dumpPcNumber(pc);
  1488. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IXOR]);
  1489. writeNewLine();
  1490. }
  1491. /**
  1492. * @see IBytecodeVisitor#_jsr_w(int, int)
  1493. */
  1494. public void _jsr_w(int pc, int branchOffset) {
  1495. dumpPcNumber(pc);
  1496. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR_W])
  1497. .append(Messages.disassembler_space)
  1498. .append(branchOffset + pc);
  1499. writeNewLine();
  1500. }
  1501. /**
  1502. * @see IBytecodeVisitor#_jsr(int, int)
  1503. */
  1504. public void _jsr(int pc, int branchOffset) {
  1505. dumpPcNumber(pc);
  1506. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR])
  1507. .append(Messages.disassembler_space)
  1508. .append(branchOffset + pc);
  1509. writeNewLine();
  1510. }
  1511. /**
  1512. * @see IBytecodeVisitor#_l2d(int)
  1513. */
  1514. public void _l2d(int pc) {
  1515. dumpPcNumber(pc);
  1516. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2D]);
  1517. writeNewLine();
  1518. }
  1519. /**
  1520. * @see IBytecodeVisitor#_l2f(int)
  1521. */
  1522. public void _l2f(int pc) {
  1523. dumpPcNumber(pc);
  1524. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2F]);
  1525. writeNewLine();
  1526. }
  1527. /**
  1528. * @see IBytecodeVisitor#_l2i(int)
  1529. */
  1530. public void _l2i(int pc) {
  1531. dumpPcNumber(pc);
  1532. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2I]);
  1533. writeNewLine();
  1534. }
  1535. /**
  1536. * @see IBytecodeVisitor#_ladd(int)
  1537. */
  1538. public void _ladd(int pc) {
  1539. dumpPcNumber(pc);
  1540. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LADD]);
  1541. writeNewLine();
  1542. }
  1543. /**
  1544. * @see IBytecodeVisitor#_laload(int)
  1545. */
  1546. public void _laload(int pc) {
  1547. dumpPcNumber(pc);
  1548. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LALOAD]);
  1549. writeNewLine();
  1550. }
  1551. /**
  1552. * @see IBytecodeVisitor#_land(int)
  1553. */
  1554. public void _land(int pc) {
  1555. dumpPcNumber(pc);
  1556. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LAND]);
  1557. writeNewLine();
  1558. }
  1559. /**
  1560. * @see IBytecodeVisitor#_lastore(int)
  1561. */
  1562. public void _lastore(int pc) {
  1563. dumpPcNumber(pc);
  1564. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LASTORE]);
  1565. writeNewLine();
  1566. }
  1567. /**
  1568. * @see IBytecodeVisitor#_lcmp(int)
  1569. */
  1570. public void _lcmp(int pc) {
  1571. dumpPcNumber(pc);
  1572. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCMP]);
  1573. writeNewLine();
  1574. }
  1575. /**
  1576. * @see IBytecodeVisitor#_lconst_0(int)
  1577. */
  1578. public void _lconst_0(int pc) {
  1579. dumpPcNumber(pc);
  1580. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_0]);
  1581. writeNewLine();
  1582. }
  1583. /**
  1584. * @see IBytecodeVisitor#_lconst_1(int)
  1585. */
  1586. public void _lconst_1(int pc) {
  1587. dumpPcNumber(pc);
  1588. buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_1]);
  1589. writeNewLine();
  1590. }
  1591. /**
  1592. * @see IBytecodeVisitor#_ldc_w(int, int, IConstantPoolEntry)
  1593. */
  1594. public void _ldc_w(int pc, int index, IConstantPoolEntry constantPoolEntry) {
  1595. dumpPcNumber(pc);
  1596. switch (constantPoolEntry.getKind()) {
  1597. case IConstantPoolConstant.CONSTANT_Float :
  1598. buffer.append(Messages.bind(Messages.classformat_ldc_w_float, new String[] {
  1599. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W],
  1600. Integer.toString(index),
  1601. Float.toString(constantPoolEntry.getFloatValue())
  1602. }));
  1603. break;
  1604. case IConstantPoolConstant.CONSTANT_Integer :
  1605. buffer.append(Messages.bind(Messages.classformat_ldc_w_integer, new String[] {
  1606. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W],
  1607. Integer.toString(index),
  1608. Integer.toString(constantPoolEntry.getIntegerValue())
  1609. }));
  1610. break;
  1611. case IConstantPoolConstant.CONSTANT_String :
  1612. buffer.append(Messages.bind(Messages.classformat_ldc_w_string, new String[] {
  1613. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W],
  1614. Integer.toString(index),
  1615. Disassembler.escapeString(constantPoolEntry.getStringValue())
  1616. }));
  1617. break;
  1618. case IConstantPoolConstant.CONSTANT_Class :
  1619. buffer.append(Messages.bind(Messages.classformat_ldc_w_class, new String[] {
  1620. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W],
  1621. Integer.toString(index),
  1622. returnConstantClassName(constantPoolEntry)
  1623. }));
  1624. }
  1625. writeNewLine();
  1626. }
  1627. /**
  1628. * @see IBytecodeVisitor#_ldc(int, int, IConstantPoolEntry)
  1629. */
  1630. public void _ldc(int pc, int index, IConstantPoolEntry constantPoolEntry) {
  1631. dumpPcNumber(pc);
  1632. switch (constantPoolEntry.getKind()) {
  1633. case IConstantPoolConstant.CONSTANT_Float :
  1634. buffer.append(Messages.bind(Messages.classformat_ldc_w_float, new String[] {
  1635. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC],
  1636. Integer.toString(index),
  1637. Float.toString(constantPoolEntry.getFloatValue())
  1638. }));
  1639. break;
  1640. case IConstantPoolConstant.CONSTANT_Integer :
  1641. buffer.append(Messages.bind(Messages.classformat_ldc_w_integer, new String[] {
  1642. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC],
  1643. Integer.toString(index),
  1644. Integer.toString(constantPoolEntry.getIntegerValue())
  1645. }));
  1646. break;
  1647. case IConstantPoolConstant.CONSTANT_String :
  1648. buffer.append(Messages.bind(Messages.classformat_ldc_w_string, new String[] {
  1649. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC],
  1650. Integer.toString(index),
  1651. Disassembler.escapeString(constantPoolEntry.getStringValue())
  1652. }));
  1653. break;
  1654. case IConstantPoolConstant.CONSTANT_Class :
  1655. buffer.append(Messages.bind(Messages.classformat_ldc_w_class, new String[] {
  1656. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC],
  1657. Integer.toString(index),
  1658. returnConstantClassName(constantPoolEntry)
  1659. }));
  1660. }
  1661. writeNewLine();
  1662. }
  1663. /**
  1664. * @see IBytecodeVisitor#_ldc2_w(int, int, IConstantPoolEntry)
  1665. */
  1666. public void _ldc2_w(int pc, int index, IConstantPoolEntry constantPoolEntry) {
  1667. dumpPcNumber(pc);
  1668. switch (constantPoolEntry.getKind()) {
  1669. case IConstantPoolConstant.CONSTANT_Long :
  1670. buffer.append(Messages.bind(Messages.classformat_ldc2_w_long, new String[] {
  1671. OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.