Dalvik VM & Java Memory Model (Concurrent programming on Android)

前端 未结 4 1938
名媛妹妹
名媛妹妹 2021-01-30 07:04

I am working on Android projects which involve the lot of concurrent programming and I am going to implement some custom inter-threads communication stuff (the one from

4条回答
  •  执笔经年
    2021-01-30 07:30

    Dalvik does not conform to any JLS edition, because conformance requires passing JCK which is not an option for Dalvik.

    programmers really should know on which features of JLS they may rely when execute their code on Dalvik

    I think the only way for them to know is to study Dalvik test suite (I bet there's one and I expect it is open source isn't it?). For any feature you need, 1) try to find a test that would fail if your feature is implemented incorrectly and check if the test looks good enough. If there's no such test or it's not good enough, 1a) add new or improve existing test. Then, 2) find out if the test has been successfully run against your target implementation. If test hasn't run then 2a) run it yourself and find out if it passes or fails.

    BTW above is roughly about how JCK works. The main difference is that one has to invest own time and effort with Dalvik for things one gets from Sun/Oracle for granted. Another difference seems to be that for Dalvik this is not documented while Snorcle has clear docs on that iirc

    But there is no any words about this in documentation.

    well if there are no words on that then I'd say quality of Dalvik documentation is suboptimal. Softly speaking

提交回复
热议问题