OSDN Git Service

CodeReader visitor dispatch now uses OpcodeInfo.
authorDan Bornstein <danfuzz@android.com>
Wed, 2 Feb 2011 22:01:52 +0000 (14:01 -0800)
committerDan Bornstein <danfuzz@android.com>
Wed, 2 Feb 2011 22:10:56 +0000 (14:10 -0800)
commitf67b6afce08a6b9b5daf7d4d69e132fda07bc78f
treec49803909b076d806bc89b268d7f768db60c1c59
parentfbb320e01b5e43a3d86740ef77961d2a9164c230
CodeReader visitor dispatch now uses OpcodeInfo.

This gets rid of the per-opcode Instruction array and just does a
simple switch. If it turns out that the switch has poor performance,
we can push the visitor abstraction down into IndexType.

The big change to OpcodeInfo is to make every Info instance always
have a non-null IndexType, exactly so it could be reliably switch()ed
on without having to do an explicit null check.

Change-Id: Iee8289f8766ce41c5043eec7212b2133ec71e682
dx/src/com/android/dx/io/CodeReader.java
dx/src/com/android/dx/io/IndexType.java
dx/src/com/android/dx/io/OpcodeInfo.java
opcode-gen/opcode-gen.awk