Clojure

chunked seqs support 'for' byte code can't be converted to dex for dalvik

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None

Description

Commit 306ef6 generates bytecode which can not be covered to dex for dalvik. See following git-bisect output for details.

306ef6d9e47253103ca0e5ae0f4b620d5fa2aeff is first bad commit
commit 306ef6d9e47253103ca0e5ae0f4b620d5fa2aeff (14316ae2110a779ffc8ac9c3da3f1c41852c4289)
Author: Chouser <chouser@n01se.net>
Date:   Sun Aug 23 21:36:41 2009 -0400

    Add support for chunked seqs to 'for'.  Refs #1

:040000 040000 d48a1b12db408d4bc5843367ea5529678522f57d 7d8717380716feab9ebc84883e60dceea8fb1e08 M src
:040000 040000 0d80fce85701005c13ce13c105524a4fff188396 5daece53b0dd2727dc7ffa9c0b773e7962de900d M test
bisect run success

processing clojure/core$generate_proxy__5911$iter__5947__5953$fn__5954$iter__5949__5956$fn__5957.class...

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information.
 at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:537)
 at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:504)
 at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:472)
 at com.android.dx.cf.code.Simulator.simulate(Simulator.java:96)
 at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:681)
 at com.android.dx.cf.code.Ropper.doit(Ropper.java:636)
 at com.android.dx.cf.code.Ropper.convert(Ropper.java:253)
 at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:252)
 at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
 at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
 at com.android.dx.command.dexer.Main.processClass(Main.java:297)
 at com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
 at com.android.dx.command.dexer.Main.access$100(Main.java:56)
 at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
 at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
 at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
 at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
 at com.android.dx.command.dexer.Main.processOne(Main.java:245)
 at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
 at com.android.dx.command.dexer.Main.run(Main.java:139)
 at com.android.dx.command.dexer.Main.main(Main.java:120)
 at com.android.dx.command.Main.main(Main.java:87)
...at bytecode offset 000000d7
locals[0000]: Lclojure/core$generate_proxy__5911$iter__5947__5953$fn__5954$iter__5949__5956$fn__5957;
locals[0001]: known-null
locals[0002]: known-null
locals[0003]: known-null
locals[0004]: known-null
locals[0005]: I
locals[0006]: Ljava/lang/Object;
stack[0003]: Lclojure/lang/IFn;
stack[0002]: Ljava/lang/Object;
stack[0001]: Ljava/lang/Object;
stack[top0]: known-null
...while working on block 00cd
...while working on method invoke:()Ljava/lang/Object;
...while processing invoke ()Ljava/lang/Object;
...while processing clojure/core$generate_proxy__5911$iter__5947__5953$fn__5954$iter__5949__5956$fn__5957.class

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/199
Hide
Assembla Importer added a comment -

richhickey said: what are the tools/commands needed to reproduce this?

Show
Assembla Importer added a comment - richhickey said: what are the tools/commands needed to reproduce this?
Hide
Assembla Importer added a comment -

remvee said: Oeps, the SHA1 in this report is not part of the official git repo but
only in my tree. I've digged around and found it at 14316a.

Anyway, the problem does not occur in the current master branch but
persist in 1.1.x branch. So please close this issue.

Just for reference, you can reproduce the problem as follows:

  • download the android SDK
  • build clojure.jar
  • run: [andriod_sdk]/platforms/android-2.0.1/tools/dx --dex clojure.jar
  • boom
Show
Assembla Importer added a comment - remvee said: Oeps, the SHA1 in this report is not part of the official git repo but only in my tree. I've digged around and found it at 14316a. Anyway, the problem does not occur in the current master branch but persist in 1.1.x branch. So please close this issue. Just for reference, you can reproduce the problem as follows:
  • download the android SDK
  • build clojure.jar
  • run: [andriod_sdk]/platforms/android-2.0.1/tools/dx --dex clojure.jar
  • boom
Hide
Assembla Importer added a comment -

aaron said: The current master 09ba677c1dfd8e75cec47d270062558c71aa551d does not cause this issue. I tested on android-7 and android-8 platforms with fresh downloads of everything. Should we close this ticket?

Show
Assembla Importer added a comment - aaron said: The current master 09ba677c1dfd8e75cec47d270062558c71aa551d does not cause this issue. I tested on android-7 and android-8 platforms with fresh downloads of everything. Should we close this ticket?
Hide
Aaron Bedra added a comment -

Contacted original poster about closing this issue.

Show
Aaron Bedra added a comment - Contacted original poster about closing this issue.
Hide
Aaron Bedra added a comment -

Orignal ticket creator agreed that this is no longer an issue. This issue was fixed sometime between 1.1 and 1.2 but since there is no patches or details on what changed here I am marking the resolution declined

Show
Aaron Bedra added a comment - Orignal ticket creator agreed that this is no longer an issue. This issue was fixed sometime between 1.1 and 1.2 but since there is no patches or details on what changed here I am marking the resolution declined

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: