Merging two heads on default branch
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 11 Aug 2014 18:17:47 +0200
changeset 1664223db336eed8
parent 1643 e6ff54a8dff6
parent 1663 03f1dd008e83
child 1666 4e349118658f
child 1676 87f66a77adf9
Merging two heads on default branch
rt/vm/pom.xml
rt/vm/src/main/assembly/bck2brwsr.xml
rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java
     1.1 --- a/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/LongArithmeticTest.java	Fri Jul 25 14:27:04 2014 +0200
     1.2 +++ b/rt/emul/compact/src/test/java/org/apidesign/bck2brwsr/tck/LongArithmeticTest.java	Mon Aug 11 18:17:47 2014 +0200
     1.3 @@ -114,7 +114,17 @@
     1.4  
     1.5          return (trueCount == 1) ? result : -2;
     1.6      }
     1.7 -
     1.8 +    
     1.9 +    @Compare public int parameterSlotCount() {
    1.10 +        long argCounts = 281479271874563L;
    1.11 +        int x = unpack(argCounts, 2);
    1.12 +        return x;
    1.13 +    }
    1.14 +    private static char unpack(long packed, int word) { // word==0 => return a, ==3 => return d
    1.15 +        assert(word <= 3);
    1.16 +        final long val = packed >> ((3-word) * 16);
    1.17 +        return (char)val;
    1.18 +    }
    1.19      @Compare public long conversion() {
    1.20          return Long.MAX_VALUE;
    1.21      }
     2.1 --- a/rt/vm/pom.xml	Fri Jul 25 14:27:04 2014 +0200
     2.2 +++ b/rt/vm/pom.xml	Mon Aug 11 18:17:47 2014 +0200
     2.3 @@ -76,51 +76,6 @@
     2.4                   <skip>false</skip>
     2.5               </configuration>
     2.6           </plugin>
     2.7 -         <plugin>
     2.8 -             <groupId>org.codehaus.mojo</groupId>
     2.9 -             <artifactId>exec-maven-plugin</artifactId>
    2.10 -             <version>1.2.1</version>
    2.11 -             <executions>
    2.12 -                 <execution>
    2.13 -                     <id>generate-js</id>
    2.14 -                     <phase>process-classes</phase>
    2.15 -                     <configuration>
    2.16 -                         <executable>java</executable>
    2.17 -                        <arguments>
    2.18 -                            <argument>-Dskip.if.exists=true</argument>
    2.19 -                            <argument>-cp</argument>
    2.20 -                            <classpath />
    2.21 -                            <argument>org.apidesign.vm4brwsr.Main</argument>
    2.22 -                            <argument>--obfuscatelevel</argument>
    2.23 -                            <argument>${bck2brwsr.obfuscationlevel}</argument>
    2.24 -                            <argument>${project.build.directory}/bck2brwsr.js</argument>
    2.25 -                            <argument>org/apidesign/vm4brwsr/Bck2Brwsr</argument>
    2.26 -                        </arguments>
    2.27 -                     </configuration>
    2.28 -                     <goals>
    2.29 -                         <goal>exec</goal>
    2.30 -                     </goals>
    2.31 -                 </execution>
    2.32 -             </executions>
    2.33 -         </plugin>
    2.34 -         <plugin>
    2.35 -             <artifactId>maven-assembly-plugin</artifactId>
    2.36 -             <version>2.4</version>
    2.37 -             <executions>
    2.38 -                 <execution>
    2.39 -                     <id>js</id>
    2.40 -                     <phase>package</phase>
    2.41 -                     <goals>
    2.42 -                         <goal>single</goal>
    2.43 -                     </goals>
    2.44 -                     <configuration>
    2.45 -                         <descriptors>
    2.46 -                             <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
    2.47 -                         </descriptors>
    2.48 -                     </configuration>
    2.49 -                 </execution>
    2.50 -             </executions>                
    2.51 -         </plugin>      
    2.52        </plugins>
    2.53    </build>
    2.54    <dependencies>
     3.1 --- a/rt/vm/src/main/assembly/bck2brwsr.xml	Fri Jul 25 14:27:04 2014 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,36 +0,0 @@
     3.4 -<?xml version="1.0"?>
     3.5 -<!--
     3.6 -
     3.7 -    Back 2 Browser Bytecode Translator
     3.8 -    Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     3.9 -
    3.10 -    This program is free software: you can redistribute it and/or modify
    3.11 -    it under the terms of the GNU General Public License as published by
    3.12 -    the Free Software Foundation, version 2 of the License.
    3.13 -
    3.14 -    This program is distributed in the hope that it will be useful,
    3.15 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.16 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.17 -    GNU General Public License for more details.
    3.18 -
    3.19 -    You should have received a copy of the GNU General Public License
    3.20 -    along with this program. Look for COPYING file in the top folder.
    3.21 -    If not, see http://opensource.org/licenses/GPL-2.0.
    3.22 -
    3.23 --->
    3.24 -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3.25 -  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    3.26 -  
    3.27 -  <id>js</id>
    3.28 -  <formats>
    3.29 -      <format>zip</format>
    3.30 -  </formats>
    3.31 -  <baseDirectory>/</baseDirectory>
    3.32 -  <files>
    3.33 -    <file>
    3.34 -      <source>${project.build.directory}/bck2brwsr.js</source>
    3.35 -      <outputDirectory>/</outputDirectory>
    3.36 -    </file>
    3.37 -  </files>
    3.38 -
    3.39 -</assembly>
    3.40 \ No newline at end of file
     4.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Fri Jul 25 14:27:04 2014 +0200
     4.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Mon Aug 11 18:17:47 2014 +0200
     4.3 @@ -846,7 +846,6 @@
     4.4                      smapper.replace(this, VarType.INTEGER, "(@1).toInt8()", smapper.getI(0));
     4.5                      break;
     4.6                  case opc_i2c:
     4.7 -                    break;
     4.8                  case opc_i2s:
     4.9                      smapper.replace(this, VarType.INTEGER, "(@1).toInt16()", smapper.getI(0));
    4.10                      break;