Mercurial > hg > graal-compiler
changeset 3123:33f0052372c6
optimized genInstanceOf XIR snippet.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Thu, 30 Jun 2011 18:03:43 +0200 |
parents | ab218bdf7077 |
children | 573c8e2917ab |
files | graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Thu Jun 30 18:00:22 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotXirGenerator.java Thu Jun 30 18:03:43 2011 +0200 @@ -636,7 +636,7 @@ @Override protected XirTemplate create(CiXirAssembler asm, long flags) { - XirOperand result = asm.restart(CiKind.Boolean); + asm.restart(CiKind.Void); XirParameter object = asm.createInputParameter("object", CiKind.Object); final XirOperand hub; hub = asm.createConstantInputParameter("hub", CiKind.Object); @@ -654,14 +654,13 @@ asm.pload(CiKind.Object, objHub, object, asm.i(config.hubOffset), false); // if we get an exact match: succeed immediately - asm.mov(result, asm.b(true)); asm.jeq(trueSucc, objHub, hub); asm.jmp(slowPath); // -- out of line ------------------------------------------------------- asm.bindOutOfLine(slowPath); - checkSubtype(asm, result, objHub, hub); - asm.jeq(falseSucc, result, asm.b(false)); + checkSubtype(asm, objHub, objHub, hub); + asm.jeq(falseSucc, objHub, asm.o(null)); asm.jmp(trueSucc); return asm.finishTemplate("instanceof");