GithubHelp home page GithubHelp logo

google / j2objc Goto Github PK

View Code? Open in Web Editor NEW
6.0K 292.0 955.0 100.65 MB

A Java to iOS Objective-C translation tool and runtime.

Home Page: http://j2objc.org

License: Apache License 2.0

Makefile 1.06% Java 93.18% Objective-C 3.00% C 1.42% C++ 0.63% Objective-C++ 0.41% Shell 0.04% Python 0.05% Awk 0.01% HTML 0.21%

j2objc's People

Contributors

adil-hussain-84 avatar advaydev1 avatar albertomisail avatar albouan avatar anjulij avatar antonio-cortes-perez avatar buggaboo avatar cpovirk avatar cushon avatar danieldickison avatar flovilmart avatar hohteri avatar ianroth avatar j2objc-copybara avatar kluever avatar kpgalligan avatar kstanger avatar limvot avatar lukhnos avatar manvithn avatar mthvedt avatar mzhang4 avatar priyankmal avatar sfuku7 avatar sjkirby avatar stefanhaustein avatar tkhho avatar tomball avatar weijunkong avatar zhouyanggao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

j2objc's Issues

ByteTest hangs [moved]

This is Issue 5 moved from a Google Code project.
Added on 2012-09-05T22:54:38.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium

Add Mockito support [moved]

This is Issue 17 moved from a Google Code project.
Added on 2012-09-05T23:07:46.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Task, Priority-Medium, Testability

Labeled break statements translating to goto statements

It appears that labeled break statements are not being translated correctly. The translator is converting java's break label; to objective-c goto label;, but the semantics of each are different. Java's break label jumps to the next statement after label (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/branch.html), whereas goto jumps to the label.

Here's a code sample demonstrating the problem:

public class Breaks {
  public static void main(String[] args) {
    int counter = 0;

    label: {
      while (counter++ < 10) {
        if (counter >= 5) {
          break label;
        }
      }
    }

    System.out.println("Counter: " + counter);
  }
}

Converted into objective-c (snippet):

+ (void)mainWithNSStringArray:(IOSObjectArray *)args {
  int counter = 0;
  label: {
    while (counter++ < 10) {
      if (counter >= 5) {
        goto label;
      }
    }
  }
  [((JavaIoPrintStream *) nil_chk([JavaLangSystem out])) printlnWithNSString:[NSString stringWithFormat:@"Counter: %d", counter]];
}

Outputs
Java: Counter: 5
Objective-c: Counter: 11

I noticed this whilst running code generated by jflex, converted to objective c.

Possible solution: a second label, "label_end", could be generated in objective c after the label's statement, and a break label could be converted to goto label_end? Related code here:

// Objective-C doesn't have a labeled break, so use a goto.

Support JUnit test suites [moved]

This is Issue 7 moved from a Google Code project.
Added on 2012-09-05T22:57:18.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, Testability

Add java.util.EventObject [moved]

This is Issue 51 moved from a Google Code project.
Added on 2012-09-27T14:23:16.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Verified).

Original labels: Type-Enhancement, Priority-Medium

Guice support [moved]

This is Issue 15 moved from a Google Code project.
Added on 2012-09-05T23:04:14.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.