View | Details | Raw Unified | Return to bug 240934 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java (+21 lines)
Lines 1490-1496 Link Here
1490
		}));
1490
		}));
1491
		writeNewLine();
1491
		writeNewLine();
1492
	}
1492
	}
1493
	/**
1494
	 * @see IBytecodeVisitor#_invokedynamic(int, int, IConstantPoolEntry, IConstantPoolEntry)
1495
	 */
1496
	public void _invokedynamic(
1497
		int pc,
1498
		int index,
1499
		IConstantPoolEntry nameEntry,
1500
		IConstantPoolEntry descriptorEntry) {
1493
1501
1502
		dumpPcNumber(pc);
1503
		this.buffer.append(Messages.bind(Messages.classformat_invokedynamic, new String[] {
1504
			OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEDYNAMIC],
1505
			Integer.toString(index),
1506
			Util.toString(
1507
				null,
1508
				nameEntry.getUtf8Value(),
1509
				descriptorEntry.getUtf8Value(),
1510
				true,
1511
				isCompact())
1512
		}));
1513
		writeNewLine();
1514
	}
1494
	/**
1515
	/**
1495
	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
1516
	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
1496
	 */
1517
	 */
(-)model/org/eclipse/jdt/internal/core/util/Messages.java (+1 lines)
Lines 316-321 Link Here
316
	public static String classformat_invokeinterface;
316
	public static String classformat_invokeinterface;
317
	public static String classformat_invokestatic;
317
	public static String classformat_invokestatic;
318
	public static String classformat_invokevirtual;
318
	public static String classformat_invokevirtual;
319
	public static String classformat_invokedynamic;
319
	public static String classformat_getfield;
320
	public static String classformat_getfield;
320
	public static String classformat_getstatic;
321
	public static String classformat_getstatic;
321
	public static String classformat_putstatic;
322
	public static String classformat_putstatic;
(-)model/org/eclipse/jdt/internal/core/util/messages.properties (+1 lines)
Lines 355-360 Link Here
355
classformat_iinc = {0} {1} {2}{3}
355
classformat_iinc = {0} {1} {2}{3}
356
classformat_invokespecial ={0} {2} [{1}]
356
classformat_invokespecial ={0} {2} [{1}]
357
classformat_invokeinterface ={0} {3} [{1}] [nargs: {2}]
357
classformat_invokeinterface ={0} {3} [{1}] [nargs: {2}]
358
classformat_invokedynamic={0} {2} [{1}]
358
classformat_invokestatic ={0} {2} [{1}]
359
classformat_invokestatic ={0} {2} [{1}]
359
classformat_invokevirtual ={0} {2} [{1}]
360
classformat_invokevirtual ={0} {2} [{1}]
360
classformat_getfield ={0} {2}.{3} : {4} [{1}]
361
classformat_getfield ={0} {2}.{3} : {4} [{1}]
(-)model/org/eclipse/jdt/internal/core/util/CodeAttribute.java (+13 lines)
Lines 1046-1051 Link Here
1046
					visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
1046
					visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
1047
					pc += 5;
1047
					pc += 5;
1048
					break;
1048
					break;
1049
				case IOpcodeMnemonics.INVOKEDYNAMIC :
1050
					index = u2At(this.classFileBytes, 1, pc);
1051
					constantPoolEntry = this.constantPool.decodeEntry(index);
1052
					if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_NameAndType) {
1053
						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
1054
					}
1055
					visitor._invokedynamic(
1056
							pc - this.codeOffset,
1057
							index,
1058
							this.constantPool.decodeEntry(constantPoolEntry.getNameAndTypeInfoNameIndex()),
1059
							this.constantPool.decodeEntry(constantPoolEntry.getNameAndTypeInfoDescriptorIndex()));
1060
					pc += 5;
1061
					break;
1049
				case IOpcodeMnemonics.NEW :
1062
				case IOpcodeMnemonics.NEW :
1050
					index = u2At(this.classFileBytes, 1, pc);
1063
					index = u2At(this.classFileBytes, 1, pc);
1051
					constantPoolEntry = this.constantPool.decodeEntry(index);
1064
					constantPoolEntry = this.constantPool.decodeEntry(index);
(-)model/org/eclipse/jdt/internal/core/util/Util.java (-6 / +6 lines)
Lines 2516-2522 Link Here
2516
2516
2517
		// decode declaring class name
2517
		// decode declaring class name
2518
		// it can be either an array signature or a type signature
2518
		// it can be either an array signature or a type signature
2519
		if (declaringClass.length > 0) {
2519
		if (declaringClass != null && declaringClass.length > 0) {
2520
			char[] declaringClassSignature = null;
2520
			char[] declaringClassSignature = null;
2521
			if (declaringClass[0] == Signature.C_ARRAY) {
2521
			if (declaringClass[0] == Signature.C_ARRAY) {
2522
				CharOperation.replace(declaringClass, '/', '.');
2522
				CharOperation.replace(declaringClass, '/', '.');
Lines 2531-2544 Link Here
2531
			} else {
2531
			} else {
2532
				buffer.append(declaringClassSignature);
2532
				buffer.append(declaringClassSignature);
2533
			}
2533
			}
2534
			if (!isConstructor) {
2535
				buffer.append('.');
2536
			}
2534
		}
2537
		}
2535
2538
2536
		// selector
2539
		// selector
2537
		if (!isConstructor) {
2540
		if (!isConstructor && methodName != null) {
2538
			buffer.append('.');
2541
			buffer.append(methodName);
2539
			if (methodName != null) {
2540
				buffer.append(methodName);
2541
			}
2542
		}
2542
		}
2543
2543
2544
		// parameters
2544
		// parameters
(-)model/org/eclipse/jdt/core/util/IOpcodeMnemonics.java (+4 lines)
Lines 204-209 Link Here
204
	int INVOKESPECIAL = 0xB7;
204
	int INVOKESPECIAL = 0xB7;
205
	int INVOKESTATIC = 0xB8;
205
	int INVOKESTATIC = 0xB8;
206
	int INVOKEINTERFACE = 0xB9;
206
	int INVOKEINTERFACE = 0xB9;
207
	/**
208
	 * @since 3.5
209
	 */
210
	int INVOKEDYNAMIC = 0xBA;
207
	int NEW = 0xBB;
211
	int NEW = 0xBB;
208
	int NEWARRAY = 0xBC;
212
	int NEWARRAY = 0xBC;
209
	int ANEWARRAY = 0xBD;
213
	int ANEWARRAY = 0xBD;
(-)model/org/eclipse/jdt/core/util/OpcodeStringValues.java (+1 lines)
Lines 207-212 Link Here
207
		BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
207
		BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
208
		BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
208
		BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
209
		BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
209
		BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
210
		BYTECODE_NAMES[INVOKEDYNAMIC] = "invokedynamic"; //$NON-NLS-1$
210
		BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
211
		BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
211
		BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
212
		BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
212
		BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
213
		BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
(-)model/org/eclipse/jdt/core/util/ByteCodeVisitorAdapter.java (-1 / +11 lines)
Lines 922-928 Link Here
922
	public void _instanceof(int pc, int index, IConstantPoolEntry constantClass) {
922
	public void _instanceof(int pc, int index, IConstantPoolEntry constantClass) {
923
		// default behavior is to do nothing
923
		// default behavior is to do nothing
924
	}
924
	}
925
925
	/**
926
	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
927
	 * @since 3.5
928
	 */
929
	public void _invokedynamic(
930
			int pc,
931
			int index,
932
			IConstantPoolEntry nameEntry,
933
			IConstantPoolEntry descriptorEntry) {
934
		// default behavior is to do nothing
935
	}
926
	/**
936
	/**
927
	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
937
	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
928
	 */
938
	 */
(-)model/org/eclipse/jdt/core/util/IBytecodeVisitor.java (+8 lines)
Lines 166-171 Link Here
166
		int pc,
166
		int pc,
167
		int index,
167
		int index,
168
		IConstantPoolEntry constantClass);
168
		IConstantPoolEntry constantClass);
169
	/**
170
	 * @since 3.5
171
	 */
172
	void _invokedynamic(
173
			int pc,
174
			int index,
175
			IConstantPoolEntry nameEntry,
176
			IConstantPoolEntry descriptorEntry);
169
	void _invokeinterface(
177
	void _invokeinterface(
170
		int pc,
178
		int pc,
171
		int index,
179
		int index,

Return to bug 240934