Permalink
Branch: master
Commits on Feb 13, 2019
  1. Do not emit @override for methods where bridges are created, since we…

    rluble authored and Copybara-Service committed Feb 13, 2019
    … don't know whether the method would be an actual override or not.
    
    Since it is normally a JsCompiler error to emit an @override when the method does not override, but the converse is already suppressed, we opt for the less strict check.
    
    PiperOrigin-RevId: 233784402
  2. Add example for @override.

    rluble authored and Copybara-Service committed Feb 13, 2019
    PiperOrigin-RevId: 233682600
Commits on Feb 10, 2019
  1. Remove an unnecessary call to java_common.default_javac_opts

    Googler Copybara-Service
    Googler authored and Copybara-Service committed Feb 10, 2019
    PiperOrigin-RevId: 233247488
Commits on Feb 8, 2019
  1. Simplify naming for TypeVariables.

    rluble authored and Copybara-Service committed Feb 8, 2019
    PiperOrigin-RevId: 233117394
  2. Improve performance of RTA algorithm.

    jDramaix authored and Copybara-Service committed Feb 8, 2019
    Get rid of Set, Map, MultiMap in the algorithm and ensure we unfold the same dynamic reference only one time. These modifications decrease the time spent in the algorithm itself from ~1min to ~1s
    
    Additional changes: refactor logic of processing polymorphic reference in order to make it more readable and fix some old comment.
    
    PiperOrigin-RevId: 233095181
Commits on Feb 6, 2019
  1. Update J2CL javac compilation to set the bootclasspath.

    gkdn authored and Copybara-Service committed Feb 6, 2019
    CL also adds extra emul classes to be included in the classpath since javac expects them due to byte code references which were fulfilled by JDK earlier. However these dependencies have been split off and no longer transpiled to JavaScript.
    
    See the related BUILD for the details of the new setup.
    
    PiperOrigin-RevId: 232759511
  2. Small cleanup around synthetic type creation

    gkdn authored and Copybara-Service committed Feb 6, 2019
    PiperOrigin-RevId: 232722288
Commits on Feb 5, 2019
  1. Stop calling goog.module.declareLegacyNamespace() on impl classes.

    gkdn authored and Copybara-Service committed Feb 5, 2019
    These are not needed.
    
    PiperOrigin-RevId: 232528147
  2. Automated g4 rollback of changelist 232424962.

    gkdn authored and Copybara-Service committed Feb 5, 2019
    *** Reason for rollback ***
    
    Broke open source.
    
    *** Original change description ***
    
    Migrate to find_java_toolchain/find_java_runtime_toolchain for Java toolchain
    and runtime resolution
    
    This change is currently a no-op; the new functions are migration shims that
    will be used to make changes to the java_common API for
    go/java-platforms-toolchains.
    
    ***
    
    PiperOrigin-RevId: 232428225
  3. Migrate to find_java_toolchain/find_java_runtime_toolchain for Java t…

    Googler Copybara-Service
    Googler authored and Copybara-Service committed Feb 5, 2019
    …oolchain
    
    and runtime resolution
    
    This change is currently a no-op; the new functions are migration shims that
    will be used to make changes to the java_common API for
    go/java-platforms-toolchains.
    
    PiperOrigin-RevId: 232424962
  4. Update protobuf version used for open-source.

    gkdn authored and Copybara-Service committed Feb 5, 2019
    This may not fix everything since I'm not able to test locally at the moment but should resolve theoretically the issue for some users.
    
    PiperOrigin-RevId: 232419746
  5. Update the bazel version used by Kokoro

    gkdn authored and Copybara-Service committed Feb 5, 2019
    PiperOrigin-RevId: 232416855
  6. Specify Bazel version in README.md

    jDramaix authored and Copybara-Service committed Feb 5, 2019
    PiperOrigin-RevId: 232391790
Commits on Feb 4, 2019
  1. Refactor typedescriptor name methods.

    rluble authored and Copybara-Service committed Feb 4, 2019
    Some methods only make sense in declared types, so they are moved down to DeclaredTypeDescriptor or removed altogether.
        getComponents()
        getSimpleBinaryName()
        getSimpleSourceName()
        getQualifiedSourceName()
        getQualifiedBinaryName()
    
    PiperOrigin-RevId: 232263917
Commits on Feb 2, 2019
  1. Remove no longer necessary nocollapse_properties flag from @jsasync u…

    gkdn authored and Copybara-Service committed Feb 2, 2019
    …sages.
    
    PiperOrigin-RevId: 232072117
Commits on Feb 1, 2019
  1. Remove workaround for getTypeBounds.

    rluble authored and Copybara-Service committed Feb 1, 2019
    PiperOrigin-RevId: 232042377
  2. Upgrade to JDT 3.16 (Java 11 language features support).

    rluble authored and Copybara-Service committed Feb 1, 2019
    PiperOrigin-RevId: 231910192
Commits on Jan 31, 2019
  1. Refactor TypeDescriptor comparisons.

    rluble authored and Copybara-Service committed Jan 31, 2019
      - remove work around now that raw TypeDescriptors are correctly computed.
        (BTW this fixes an error in the treatment of IntersectionTypeDescriptors).
      - introduce isSameBaseType to compare types without paramterization nor nullability.
    
    PiperOrigin-RevId: 231769716
  2. Fix typo in method name.

    rluble authored and Copybara-Service committed Jan 31, 2019
    PiperOrigin-RevId: 231713001
  3. Revert of "Add suppression for checks related to static member overri…

    rluble authored and Copybara-Service committed Jan 31, 2019
    …de."
    
    PiperOrigin-RevId: 231710940
Commits on Jan 30, 2019
  1. Add suppression for checks related to static member override.

    rluble authored and Copybara-Service committed Jan 30, 2019
    It is relatively safe to suppress errors about JavaScript static overrides since all dispatches to static methods from Java code are explicitly qualified with the right constructor. For code written in JavaScript can still call these methods dynamically on constructor objects, so the warning might have been useful in this corner case; in the current state it is actually safe, because J2CL requires the use of --collapse_properties, which does not support dynamic dispatch for static methods either.
    
    Removes previous work around for Enum::valueOf as it is no longer needed.
    
    PiperOrigin-RevId: 231588679
Commits on Jan 29, 2019
  1. Small cleanup of AST builders.

    rluble authored and Copybara-Service committed Jan 29, 2019
    PiperOrigin-RevId: 231351185
  2. Make varargs lambdas have the Java semantics w.r.t. to side effects o…

    rluble authored and Copybara-Service committed Jan 29, 2019
    …n the varargs parameter.
    
    Lambdas are implemented with small adaptor class and a JavaScript function (jsfunction). The transformation, done in ImplementLambdaExpressions, converts the original lambda into a jsfunction lambda. Such transformation did not account for the difference in semantics regarding vararg parameters.
    
    PiperOrigin-RevId: 231346112
Commits on Jan 28, 2019
  1. Small cleanup in regression tests.

    rluble authored and Copybara-Service committed Jan 28, 2019
    PiperOrigin-RevId: 231226245
  2. Make sure lambdas behave as expected w.r.t. specialized bridges.

    rluble authored and Copybara-Service committed Jan 28, 2019
    gmail impact  + 130 bytes
    kix impact  - 80 bytes
    
    PiperOrigin-RevId: 231208045
Commits on Jan 25, 2019
  1. Add example for side effects to the varargs argument in lambdas.

    rluble authored and Copybara-Service committed Jan 25, 2019
    PiperOrigin-RevId: 230973274
  2. Automated g4 rollback of changelist 230839048.

    gkdn authored and Copybara-Service committed Jan 25, 2019
    *** Reason for rollback ***
    
    Broke calendar
    
    *** Original change description ***
    
    Avoid running java_common.compile when there are no java srcs.
    
    Even there are no srcs, we create dummy srcs pass that to java_common.compile so it doesn't choke (b/110982833). This creates unnecessary workload in the build graph (not sure how much) as it needs to trigger javac actions.
    
    I'm adding a simple work around so this doesn't happen anymore.
    
    ***
    
    PiperOrigin-RevId: 230848637
  3. Avoid running java_common.compile when there are no java srcs.

    gkdn authored and Copybara-Service committed Jan 25, 2019
    Even there are no srcs, we create dummy srcs pass that to java_common.compile so it doesn't choke (b/110982833). This creates unnecessary workload in the build graph (not sure how much) as it needs to trigger javac actions.
    
    I'm adding a simple work around so this doesn't happen anymore.
    
    PiperOrigin-RevId: 230839048
Commits on Jan 22, 2019
  1. Clean up TODO in RapidTypeAnalyser since b/112859205 is fixed.

    jDramaix authored and Copybara-Service committed Jan 22, 2019
    The inheriting types set of a member that has been polymorphically referenced can never be empty.
    
    PiperOrigin-RevId: 230386393
Commits on Jan 18, 2019
  1. Support building with non-default java toolchain.

    aparkins authored and Copybara-Service committed Jan 18, 2019
    See https://issuetracker.google.com/issues/122629756
    
    PiperOrigin-RevId: 229976358
  2. Report the member source position for JsEnum assignment checks.

    rluble authored and Copybara-Service committed Jan 18, 2019
    PiperOrigin-RevId: 229970126
  3. Moves LibraryInfo into J2clInfo provider

    gkdn authored and Copybara-Service committed Jan 18, 2019
    PiperOrigin-RevId: 229837671
Commits on Jan 16, 2019
  1. Makes sure we always generate a zip output for j2cl targets.

    gkdn authored and Copybara-Service committed Jan 16, 2019
    This makes sure we don't get errors from bazel when the named output is accessed and is inline with how we (and java_library) behaves with jar and src.jar output.
    
    PiperOrigin-RevId: 229613627
Commits on Jan 15, 2019
  1. Move src-jar hack to the rule.

    gkdn authored and Copybara-Service committed Jan 15, 2019
    When it is in macro, every J2CL provider would need to repeat that which would be bad.
    
    PiperOrigin-RevId: 229423159
Commits on Jan 14, 2019
  1. Fix bad expansion of unary expressions.

    rluble authored and Copybara-Service committed Jan 14, 2019
    Since J2CL backend (ExpressionTranspiler) does not insert parenthesis to preserve correct precedence, but instead relies the parenthesis being explicitly represented in the AST (see b/67753876) extra care needs to be taken when performing transformations.
    
    In this case expressions like ++a might get expanded to a = a + 1 where the assignment operator = is of much lower precedence than the decrement. This might be problematic in expressions like ++a < 4  where the lack of parenthesis after expansion to a = a + 1 < 4 changes its meaning.
    
    In a sane world, parenthesis would not be explicitly represented in the IR but just computed upon code generation. The actual order of operations is dictated by the structure of the tree, making them unnecessary. This is not as grim as it seems since almost all transformations insert calls or constructs of the highest precedence.
    
    PiperOrigin-RevId: 229261436