Skip to content

Commit f40007e

Browse files
ClassfileParser: apply scala commit e78896f (invokedynamic)
1 parent 357d5cc commit f40007e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/dotty/tools/dotc/core/pickling/ClassfileConstants.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ object ClassfileConstants {
6868
final val CONSTANT_INTFMETHODREF = 11
6969
final val CONSTANT_NAMEANDTYPE = 12
7070

71+
final val CONSTANT_METHODHANDLE = 15
72+
final val CONSTANT_METHODTYPE = 16
73+
final val CONSTANT_INVOKEDYNAMIC = 18
74+
7175
// tags describing the type of a literal in attribute values
7276
final val BYTE_TAG = 'B'
7377
final val CHAR_TAG = 'C'

src/dotty/tools/dotc/core/pickling/ClassfileParser.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,13 @@ class ClassfileParser(
773773
(in.nextByte.toInt: @switch) match {
774774
case CONSTANT_UTF8 | CONSTANT_UNICODE =>
775775
in.skip(in.nextChar)
776-
case CONSTANT_CLASS | CONSTANT_STRING =>
776+
case CONSTANT_CLASS | CONSTANT_STRING | CONSTANT_METHODTYPE =>
777777
in.skip(2)
778+
case CONSTANT_METHODHANDLE =>
779+
in.skip(3)
778780
case CONSTANT_FIELDREF | CONSTANT_METHODREF | CONSTANT_INTFMETHODREF
779-
| CONSTANT_NAMEANDTYPE | CONSTANT_INTEGER | CONSTANT_FLOAT =>
781+
| CONSTANT_NAMEANDTYPE | CONSTANT_INTEGER | CONSTANT_FLOAT
782+
| CONSTANT_INVOKEDYNAMIC =>
780783
in.skip(4)
781784
case CONSTANT_LONG | CONSTANT_DOUBLE =>
782785
in.skip(8)

0 commit comments

Comments
 (0)