@@ -267,7 +267,7 @@ public Code declare(MethodId<?, ?> method, int flags) {
267267 }
268268
269269 int supportedFlags = Modifier .PUBLIC | Modifier .PRIVATE | Modifier .PROTECTED
270- | Modifier .STATIC | Modifier .FINAL | Modifier .SYNCHRONIZED
270+ | Modifier .STATIC | Modifier .FINAL | Modifier .SYNCHRONIZED | Modifier . NATIVE | Modifier . TRANSIENT
271271 | AccessFlags .ACC_SYNTHETIC | AccessFlags .ACC_BRIDGE ;
272272 if ((flags & ~supportedFlags ) != 0 ) {
273273 throw new IllegalArgumentException ("Unexpected flag: "
@@ -655,10 +655,16 @@ boolean isDirect() {
655655 }
656656
657657 EncodedMethod toEncodedMethod (DexOptions dexOptions ) {
658- RopMethod ropMethod = new RopMethod (code .toBasicBlocks (), 0 );
659- LocalVariableInfo locals = null ;
660- DalvCode dalvCode = RopTranslator .translate (
661- ropMethod , PositionList .NONE , locals , code .paramSize (), dexOptions );
658+ DalvCode dalvCode ;
659+ if ((this .flags & Modifier .NATIVE ) != 0 ) {
660+ dalvCode = null ;
661+ } else {
662+ RopMethod ropMethod = new RopMethod (code .toBasicBlocks (), 0 );
663+ LocalVariableInfo locals = null ;
664+ dalvCode = RopTranslator .translate (
665+ ropMethod , PositionList .NONE , locals , code .paramSize (), dexOptions );
666+ }
667+
662668 return new EncodedMethod (method .constant , flags , dalvCode , StdTypeList .EMPTY );
663669 }
664670 }
0 commit comments