Codebase list aspectj / f4297cb
New upstream version 1.9.0~beta5 Emmanuel Bourg 5 years ago
4 changed file(s) with 22 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
25462546 this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
25472547 } else if (currentArg.equals("1.8") || currentArg.equals("8") || currentArg.equals("8.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
25482548 this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
2549 } else if (currentArg.equals("1.9") || currentArg.equals("9") || currentArg.equals("9.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
2550 this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_9);
25492551 }
25502552 else if (currentArg.equals("jsr14")) { //$NON-NLS-1$
25512553 this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_JSR14);
26022604 this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
26032605 } else if (currentArg.equals("1.8") || currentArg.equals("8") || currentArg.equals("8.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
26042606 this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
2607 } else if (currentArg.equals("1.9") || currentArg.equals("9") || currentArg.equals("9.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
2608 this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
26052609 } else {
26062610 throw new IllegalArgumentException(this.bind("configure.source", currentArg)); //$NON-NLS-1$
26072611 }
48434847 } else if (CompilerOptions.VERSION_1_8.equals(version)) {
48444848 if (!didSpecifyCompliance) this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
48454849 if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
4850 } else if (CompilerOptions.VERSION_9.equals(version)) {
4851 if (!didSpecifyCompliance) this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_9);
4852 if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_9);
48464853 }
48474854 }
48484855
48494856 final String sourceVersion = this.options.get(CompilerOptions.OPTION_Source);
48504857 final String compliance = this.options.get(CompilerOptions.OPTION_Compliance);
4851 if (sourceVersion.equals(CompilerOptions.VERSION_1_8)
4858 if (sourceVersion.equals(CompilerOptions.VERSION_9)
4859 && CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) {
4860 // compliance must be 1.9 if source is 1.9
4861 throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForSource", this.options.get(CompilerOptions.OPTION_Compliance), CompilerOptions.VERSION_9)); //$NON-NLS-1$
4862 } else if (sourceVersion.equals(CompilerOptions.VERSION_1_8)
48524863 && CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK1_8) {
48534864 // compliance must be 1.8 if source is 1.8
48544865 throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForSource", this.options.get(CompilerOptions.OPTION_Compliance), CompilerOptions.VERSION_1_8)); //$NON-NLS-1$
48874898 throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForCldcTarget", targetVersion, sourceVersion)); //$NON-NLS-1$
48884899 }
48894900 } else {
4901 // target must be 1.9 if source is 1.9
4902 if (CompilerOptions.versionToJdkLevel(sourceVersion) >= ClassFileConstants.JDK9
4903 && CompilerOptions.versionToJdkLevel(targetVersion) < ClassFileConstants.JDK9){
4904 throw new IllegalArgumentException(this.bind("configure.incompatibleTargetForSource", targetVersion, CompilerOptions.VERSION_9)); //$NON-NLS-1$
4905 }
48904906 // target must be 1.8 if source is 1.8
48914907 if (CompilerOptions.versionToJdkLevel(sourceVersion) >= ClassFileConstants.JDK1_8
48924908 && CompilerOptions.versionToJdkLevel(targetVersion) < ClassFileConstants.JDK1_8){
794794 }
795795 return bytes;
796796 }
797
798 // protected static byte[] readCharTable(Class parserClass, String filename) throws java.io.IOException { // AspectJ Extension - used passed class not static ref
799 //
800 //
801 // //files are located at Parser.class directory
802 //
803 // InputStream stream = parserClass.getResourceAsStream(filename); // AspectJ Extension - used passed class not static ref
804 // if (stream == null) {
805 // throw new java.io.IOException(Messages.bind(Messages.parser_missingFile, filename));
806 // }
807 // char[] bytes = null;
808 // try {
809 // stream = new BufferedInputStream(stream);
810 // bytes = Util.getInputStreamAsByteArray(stream, -1);
811 // } finally {
812 // try {
813 // stream.close();
814 // } catch (IOException e) {
815 // // ignore
816 // }
817 // }
818 // return bytes;
819 // }
820797 protected static long[] readLongTable(Class parserClass, String filename) throws java.io.IOException { // AspectJ Extension - used passed class not static ref
821798
822799 //files are located at Parser.class directory
938915 return chars;
939916 }
940917 public static int tAction(int state, int sym) {
941 try {
942 int bas = base_action[state];
943 int tcheck = term_check[bas+sym];
944 int idx = tcheck==sym?bas+sym:bas;
945 int taction = term_action[idx];
946 return term_action[term_check[base_action[state]+sym] == sym ? base_action[state] + sym : base_action[state]];
947 } catch (Throwable t) {
948 int stop =1 ;
949 throw t;
950 }
918 return term_action[term_check[base_action[state]+sym] == sym ? base_action[state] + sym : base_action[state]];
951919 }
952920 protected int astLengthPtr;
953921
252252
253253 public static final String COMMAND_EDITOR_NAME = AjcTask.class.getName() + ".COMMAND_EDITOR";
254254
255 static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8" };
256 static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8" };
257 static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6", "-1.7", "-1.8" };
255 static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9" };
256 static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9" };
257 static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6", "-1.7", "-1.8", "1.9" };
258258
259259 private static final ICommandEditor COMMAND_EDITOR;
260260
1212 <classpathentry kind="lib" path="/lib/bcel/bcel.jar" sourcepath="/lib/bcel/bcel-src.zip"/>
1313 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
1414 <classpathentry combineaccessrules="false" kind="src" path="/org.aspectj.matcher"/>
15 <classpathentry kind="lib" path="/lib/asm/asm-5.0.1.renamed.jar"/>
15 <classpathentry kind="lib" path="/lib/asm/asm-6.0_ALPHA.renamed.jar"/>
1616 <classpathentry kind="output" path="bin"/>
1717 </classpath>