1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.ast;
13 public abstract class OperatorExpression extends Expression implements
16 public static int[][] ResolveTypeTables = new int[NumberOfTables][];
23 * OperatorExpression constructor comment.
25 public OperatorExpression() {
29 public static final void classInitialize() {
30 ResolveTypeTables[AND] = get_AND();
31 ResolveTypeTables[AND_AND] = get_AND_AND();
32 ResolveTypeTables[DIVIDE] = get_DIVIDE();
33 ResolveTypeTables[EQUAL_EQUAL] = get_EQUAL_EQUAL();
34 ResolveTypeTables[GREATER] = get_GREATER();
35 ResolveTypeTables[GREATER_EQUAL] = get_GREATER_EQUAL();
36 ResolveTypeTables[LEFT_SHIFT] = get_LEFT_SHIFT();
37 ResolveTypeTables[LESS] = get_LESS();
38 ResolveTypeTables[LESS_EQUAL] = get_LESS_EQUAL();
39 ResolveTypeTables[MINUS] = get_MINUS();
40 ResolveTypeTables[MULTIPLY] = get_MULTIPLY();
41 ResolveTypeTables[OR] = get_OR();
42 ResolveTypeTables[OR_OR] = get_OR_OR();
43 ResolveTypeTables[PLUS] = get_PLUS();
44 ResolveTypeTables[REMAINDER] = get_REMAINDER();
45 ResolveTypeTables[RIGHT_SHIFT] = get_RIGHT_SHIFT();
46 ResolveTypeTables[UNSIGNED_RIGHT_SHIFT] = get_UNSIGNED_RIGHT_SHIFT();
47 ResolveTypeTables[XOR] = get_XOR();
50 public static final String generateTableTestCase() {
51 // return a String which is a java method allowing to test
52 // the non zero entries of all tables
55 * net.sourceforge.phpdt.internal.compiler.ast.
56 * OperatorExpression.generateTableTestCase();
59 int[] operators = new int[] { AND, AND_AND, DIVIDE, GREATER,
60 GREATER_EQUAL, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MULTIPLY,
61 OR, OR_OR, PLUS, REMAINDER, RIGHT_SHIFT, UNSIGNED_RIGHT_SHIFT,
65 public final String constant(int code) {
68 return "true"; //$NON-NLS-1$
70 return "((byte) 3)"; //$NON-NLS-1$
72 return "'A'"; //$NON-NLS-1$
74 return "300.0d"; //$NON-NLS-1$
76 return "100.0f"; //$NON-NLS-1$
78 return "1"; //$NON-NLS-1$
80 return "7L"; //$NON-NLS-1$
82 return "\"hello-world\""; //$NON-NLS-1$
84 return "null"; //$NON-NLS-1$
86 return "((short) 5)"; //$NON-NLS-1$
88 return "null";} //$NON-NLS-1$
89 return "";} //$NON-NLS-1$
91 public final String type(int code) {
94 return "z"; //$NON-NLS-1$
96 return "b"; //$NON-NLS-1$
98 return "c"; //$NON-NLS-1$
100 return "d"; //$NON-NLS-1$
102 return "f"; //$NON-NLS-1$
104 return "i"; //$NON-NLS-1$
106 return "l"; //$NON-NLS-1$
108 return "str"; //$NON-NLS-1$
110 return "null"; //$NON-NLS-1$
112 return "s"; //$NON-NLS-1$
114 return "obj";} //$NON-NLS-1$
115 return "xxx";} //$NON-NLS-1$
117 public final String operator(int operator) {
120 return "=="; //$NON-NLS-1$
122 return "<="; //$NON-NLS-1$
124 return ">="; //$NON-NLS-1$
126 return "<<"; //$NON-NLS-1$
128 return ">>"; //$NON-NLS-1$
129 case UNSIGNED_RIGHT_SHIFT:
130 return ">>>"; //$NON-NLS-1$
132 return "||"; //$NON-NLS-1$
134 return "&&"; //$NON-NLS-1$
136 return "+"; //$NON-NLS-1$
138 return "-"; //$NON-NLS-1$
140 return "!"; //$NON-NLS-1$
142 return "%"; //$NON-NLS-1$
144 return "^"; //$NON-NLS-1$
146 return "&"; //$NON-NLS-1$
148 return "*"; //$NON-NLS-1$
150 return "|"; //$NON-NLS-1$
152 return "~"; //$NON-NLS-1$
154 return "/"; //$NON-NLS-1$
156 return ">"; //$NON-NLS-1$
158 return "<";}; //$NON-NLS-1$
159 return "????";} //$NON-NLS-1$
162 Decode decode = new Decode();
165 s = "\tpublic static void binaryOperationTablesTestCase(){\n" + //$NON-NLS-1$
167 "\t\t//TC test : all binary operation (described in tables)\n"
169 "\t\t//method automatically generated by\n"
171 "\t\t//net.sourceforge.phpdt.internal.compiler.ast.OperatorExpression.generateTableTestCase();\n"
174 "\t\tString str0 ;\t String str\t= "
175 + decode.constant(T_String)
176 + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
177 "\t\tint i0 ;\t int i\t= "
178 + decode.constant(T_int)
179 + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
180 "\t\tboolean z0;\t boolean z\t= "
181 + decode.constant(T_boolean)
182 + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
183 "\t\tchar c0; \t char c\t= "
184 + decode.constant(T_char)
185 + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
186 "\t\tfloat f0; \t float f\t= "
187 + decode.constant(T_float)
188 + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
189 "\t\tdouble d0;\t double d\t= "
190 + decode.constant(T_double)
191 + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
192 "\t\tbyte b0; \t byte b\t= "
193 + decode.constant(T_byte)
194 + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
195 "\t\tshort s0; \t short s\t= "
196 + decode.constant(T_short)
197 + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
198 "\t\tlong l0; \t long l\t= "
199 + decode.constant(T_long)
200 + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
201 "\t\tObject obj0; \t Object obj\t= "
202 + decode.constant(T_Object) + " ;\n" + //$NON-NLS-1$ //$NON-NLS-2$
206 for (int i = 0; i < operators.length; i++) {
207 int operator = operators[i];
208 for (int left = 0; left < 16; left++)
209 for (int right = 0; right < 16; right++) {
210 int result = (ResolveTypeTables[operator][(left << 4)
212 if (result != T_undefined)
214 // 1/ First regular computation then 2/ comparaison
215 // with a compile time constant (generated by the compiler)
217 // if ( z0 != (((short) 5) >= ((short) 5)))
218 // System.out.println(155);
221 s += "\t\t" + decode.type(result) + "0" + " = " + decode.type(left); //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
222 s += " " + decode.operator(operator) + " " + decode.type(right) + ";\n"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
223 String begin = result == T_String ? "\t\tif (! " : "\t\tif ( "; //$NON-NLS-2$ //$NON-NLS-1$
224 String test = result == T_String ? ".equals(" : " != ("; //$NON-NLS-2$ //$NON-NLS-1$
225 s += begin + decode.type(result) + "0" + test //$NON-NLS-1$
226 + decode.constant(left) + " " //$NON-NLS-1$
227 + decode.operator(operator) + " " //$NON-NLS-1$
228 + decode.constant(right) + "))\n"; //$NON-NLS-1$
229 s += "\t\t\tSystem.out.println(" + (++error) + ");\n"; //$NON-NLS-1$ //$NON-NLS-2$
235 return s += "\n\t\tSystem.out.println(\"binary tables test : done\");}"; //$NON-NLS-1$
238 public static final int[] get_AND() {
240 // the code is an int
241 // (cast) left Op (cast) rigth --> result
242 // 0000 0000 0000 0000 0000
245 int[] table = new int[16 * 16];
247 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
248 // table[(T_undefined<<4)+T_byte] = T_undefined ;
249 // table[(T_undefined<<4)+T_long] = T_undefined ;
250 // table[(T_undefined<<4)+T_short] = T_undefined ;
251 // table[(T_undefined<<4)+T_void] = T_undefined ;
252 // table[(T_undefined<<4)+T_String] = T_undefined ;
253 // table[(T_undefined<<4)+T_Object] = T_undefined ;
254 // table[(T_undefined<<4)+T_double] = T_undefined ;
255 // table[(T_undefined<<4)+T_float] = T_undefined ;
256 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
257 // table[(T_undefined<<4)+T_char] = T_undefined ;
258 // table[(T_undefined<<4)+T_int] = T_undefined ;
259 // table[(T_undefined<<4)+T_null] = T_undefined ;
261 // table[(T_byte<<4)+T_undefined] = T_undefined ;
262 table[(T_byte << 4) + T_byte] = (Byte2Int << 12) + (Byte2Int << 4)
264 table[(T_byte << 4) + T_long] = (Byte2Long << 12) + (Long2Long << 4)
266 table[(T_byte << 4) + T_short] = (Byte2Int << 12) + (Short2Int << 4)
268 // table[(T_byte<<4)+T_void] = T_undefined ;
269 // table[(T_byte<<4)+T_String] = T_undefined ;
270 // table[(T_byte<<4)+T_Object] = T_undefined ;
271 // table[(T_byte<<4)+T_double] = T_undefined ;
272 // table[(T_byte<<4)+T_float] = T_undefined ;
273 // table[(T_byte<<4)+T_boolean] = T_undefined ;
274 table[(T_byte << 4) + T_char] = (Byte2Int << 12) + (Char2Int << 4)
276 table[(T_byte << 4) + T_int] = (Byte2Int << 12) + (Int2Int << 4)
278 // table[(T_byte<<4)+T_null] = T_undefined ;
280 // table[(T_long<<4)+T_undefined] = T_undefined ;
281 table[(T_long << 4) + T_byte] = (Long2Long << 12) + (Byte2Long << 4)
283 table[(T_long << 4) + T_long] = (Long2Long << 12) + (Long2Long << 4)
285 table[(T_long << 4) + T_short] = (Long2Long << 12) + (Short2Long << 4)
288 // table[(T_long<<4)+T_void] = T_undefined ;
289 // table[(T_long<<4)+T_String] = T_undefined ;
290 // table[(T_long<<4)+T_Object] = T_undefined ;
291 // table[(T_long<<4)+T_double] = T_undefined ;
292 // table[(T_long<<4)+T_float] = T_undefined ;
293 // table[(T_long<<4)+T_boolean] = T_undefined ;
294 table[(T_long << 4) + T_char] = (Long2Long << 12) + (Char2Long << 4)
296 table[(T_long << 4) + T_int] = (Long2Long << 12) + (Int2Long << 4)
298 // table[(T_long<<4)+T_null] = T_undefined ;
300 // table[(T_short<<4)+T_undefined] = T_undefined ;
301 table[(T_short << 4) + T_byte] = (Short2Int << 12) + (Byte2Int << 4)
303 table[(T_short << 4) + T_long] = (Short2Long << 12) + (Long2Long << 4)
305 table[(T_short << 4) + T_short] = (Short2Int << 12) + (Short2Int << 4)
307 // table[(T_short<<4)+T_void] = T_undefined ;
308 // table[(T_short<<4)+T_String] = T_undefined ;
309 // table[(T_short<<4)+T_Object] = T_undefined ;
310 // table[(T_short<<4)+T_double] = T_undefined ;
311 // table[(T_short<<4)+T_float] = T_undefined ;
312 // table[(T_short<<4)+T_boolean] = T_undefined ;
313 table[(T_short << 4) + T_char] = (Short2Int << 12) + (Char2Int << 4)
315 table[(T_short << 4) + T_int] = (Short2Int << 12) + (Int2Int << 4)
317 // table[(T_short<<4)+T_null] = T_undefined ;
319 // table[(T_void<<4)+T_undefined] = T_undefined ;
320 // table[(T_void<<4)+T_byte] = T_undefined ;
321 // table[(T_void<<4)+T_long] = T_undefined ;
322 // table[(T_void<<4)+T_short] = T_undefined ;
323 // table[(T_void<<4)+T_void] = T_undefined ;
324 // table[(T_void<<4)+T_String] = T_undefined ;
325 // table[(T_void<<4)+T_Object] = T_undefined ;
326 // table[(T_void<<4)+T_double] = T_undefined ;
327 // table[(T_void<<4)+T_float] = T_undefined ;
328 // table[(T_void<<4)+T_boolean] = T_undefined ;
329 // table[(T_void<<4)+T_char] = T_undefined ;
330 // table[(T_void<<4)+T_int] = T_undefined ;
331 // table[(T_void<<4)+T_null] = T_undefined ;
333 // table[(T_String<<4)+T_undefined] = T_undefined ;
334 // table[(T_String<<4)+T_byte] = T_undefined ;
335 // table[(T_String<<4)+T_long] = T_undefined ;
336 // table[(T_String<<4)+T_short] = T_undefined ;
337 // table[(T_String<<4)+T_void] = T_undefined ;
338 // table[(T_String<<4)+T_String] = T_undefined ;
339 // table[(T_String<<4)+T_Object] = T_undefined ;
340 // table[(T_String<<4)+T_double] = T_undefined ;
341 // table[(T_String<<4)+T_float] = T_undefined ;
342 // table[(T_String<<4)+T_boolean] = T_undefined ;
343 // table[(T_String<<4)+T_char] = T_undefined ;
344 // table[(T_String<<4)+T_int] = T_undefined ;
345 // table[(T_String<<4)+T_null] = T_undefined ;
347 // table[(T_Object<<4)+T_undefined] = T_undefined ;
348 // table[(T_Object<<4)+T_byte] = T_undefined ;
349 // table[(T_Object<<4)+T_long] = T_undefined ;
350 // table[(T_Object<<4)+T_short] = T_undefined ;
351 // table[(T_Object<<4)+T_void] = T_undefined ;
352 // table[(T_Object<<4)+T_String] = T_undefined ;
353 // table[(T_Object<<4)+T_Object] = T_undefined ;
354 // table[(T_Object<<4)+T_double] = T_undefined ;
355 // table[(T_Object<<4)+T_float] = T_undefined ;
356 // table[(T_Object<<4)+T_boolean] = T_undefined ;
357 // table[(T_Object<<4)+T_char] = T_undefined ;
358 // table[(T_Object<<4)+T_int] = T_undefined ;
359 // table[(T_Object<<4)+T_null] = T_undefined ;
361 // table[(T_double<<4)+T_undefined] = T_undefined ;
362 // table[(T_double<<4)+T_byte] = T_undefined ;
363 // table[(T_double<<4)+T_long] = T_undefined ;
364 // table[(T_double<<4)+T_short] = T_undefined ;
365 // table[(T_double<<4)+T_void] = T_undefined ;
366 // table[(T_double<<4)+T_String] = T_undefined ;
367 // table[(T_double<<4)+T_Object] = T_undefined ;
368 // table[(T_double<<4)+T_double] = T_undefined ;
369 // table[(T_double<<4)+T_float] = T_undefined ;
370 // table[(T_double<<4)+T_boolean] = T_undefined ;
371 // table[(T_double<<4)+T_char] = T_undefined ;
372 // table[(T_double<<4)+T_int] = T_undefined;
373 // table[(T_double<<4)+T_null] = T_undefined ;
375 // table[(T_float<<4)+T_undefined] = T_undefined ;
376 // table[(T_float<<4)+T_byte] = T_undefined ;
377 // table[(T_float<<4)+T_long] = T_undefined ;
378 // table[(T_float<<4)+T_short] = T_undefined ;
379 // table[(T_float<<4)+T_void] = T_undefined ;
380 // table[(T_float<<4)+T_String] = T_undefined ;
381 // table[(T_float<<4)+T_Object] = T_undefined ;
382 // table[(T_float<<4)+T_double] = T_undefined ;
383 // table[(T_float<<4)+T_float] = T_undefined ;
384 // table[(T_float<<4)+T_boolean] = T_undefined ;
385 // table[(T_float<<4)+T_char] = T_undefined ;
386 // table[(T_float<<4)+T_int] = T_undefined ;
387 // table[(T_float<<4)+T_null] = T_undefined ;
389 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
390 // table[(T_boolean<<4)+T_byte] = T_undefined ;
391 // table[(T_boolean<<4)+T_long] = T_undefined ;
392 // table[(T_boolean<<4)+T_short] = T_undefined ;
393 // table[(T_boolean<<4)+T_void] = T_undefined ;
394 // table[(T_boolean<<4)+T_String] = T_undefined ;
395 // table[(T_boolean<<4)+T_Object] = T_undefined ;
396 // table[(T_boolean<<4)+T_double] = T_undefined ;
397 // table[(T_boolean<<4)+T_float] = T_undefined ;
398 table[(T_boolean << 4) + T_boolean] = (Boolean2Boolean << 12)
399 + (Boolean2Boolean << 4) + T_boolean;
400 // table[(T_boolean<<4)+T_char] = T_undefined ;
401 // table[(T_boolean<<4)+T_int] = T_undefined ;
402 // table[(T_boolean<<4)+T_null] = T_undefined ;
404 // table[(T_char<<4)+T_undefined] = T_undefined ;
405 table[(T_char << 4) + T_byte] = (Char2Int << 12) + (Byte2Int << 4)
407 table[(T_char << 4) + T_long] = (Char2Long << 12) + (Long2Long << 4)
409 table[(T_char << 4) + T_short] = (Char2Int << 12) + (Short2Int << 4)
411 // table[(T_char<<4)+T_void] = T_undefined ;
412 // table[(T_char<<4)+T_String] = T_undefined ;
413 // table[(T_char<<4)+T_Object] = T_undefined ;
414 // table[(T_char<<4)+T_double] = T_undefined ;
415 // table[(T_char<<4)+T_float] = T_undefined ;
416 // table[(T_char<<4)+T_boolean] = T_undefined ;
417 table[(T_char << 4) + T_char] = (Char2Int << 12) + (Char2Int << 4)
419 table[(T_char << 4) + T_int] = (Char2Int << 12) + (Int2Int << 4)
421 // table[(T_char<<4)+T_null] = T_undefined ;
423 // table[(T_int<<4)+T_undefined] = T_undefined ;
424 table[(T_int << 4) + T_byte] = (Int2Int << 12) + (Byte2Int << 4)
426 table[(T_int << 4) + T_long] = (Int2Long << 12) + (Long2Long << 4)
428 table[(T_int << 4) + T_short] = (Int2Int << 12) + (Short2Int << 4)
430 // table[(T_int<<4)+T_void] = T_undefined ;
431 // table[(T_int<<4)+T_String] = T_undefined ;
432 // table[(T_int<<4)+T_Object] = T_undefined ;
433 // table[(T_int<<4)+T_double] = T_undefined ;
434 // table[(T_int<<4)+T_float] = T_undefined ;
435 // table[(T_int<<4)+T_boolean] = T_undefined ;
436 table[(T_int << 4) + T_char] = (Int2Int << 12) + (Char2Int << 4)
438 table[(T_int << 4) + T_int] = (Int2Int << 12) + (Int2Int << 4) + T_int;
439 // table[(T_int<<4)+T_null] = T_undefined ;
441 // table[(T_null<<4)+T_undefined] = T_undefined ;
442 // table[(T_null<<4)+T_byte] = T_undefined ;
443 // table[(T_null<<4)+T_long] = T_undefined ;
444 // table[(T_null<<4)+T_short] = T_undefined ;
445 // table[(T_null<<4)+T_void] = T_undefined ;
446 // table[(T_null<<4)+T_String] = T_undefined ;
447 // table[(T_null<<4)+T_Object] = T_undefined ;
448 // table[(T_null<<4)+T_double] = T_undefined ;
449 // table[(T_null<<4)+T_float] = T_undefined ;
450 // table[(T_null<<4)+T_boolean] = T_undefined ;
451 // table[(T_null<<4)+T_char] = T_undefined ;
452 // table[(T_null<<4)+T_int] = T_undefined ;
453 // table[(T_null<<4)+T_null] = T_undefined ;
458 public static final int[] get_AND_AND() {
460 // the code is an int
461 // (cast) left Op (cast) rigth --> result
462 // 0000 0000 0000 0000 0000
465 int[] table = new int[16 * 16];
467 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
468 // table[(T_undefined<<4)+T_byte] = T_undefined ;
469 // table[(T_undefined<<4)+T_long] = T_undefined ;
470 // table[(T_undefined<<4)+T_short] = T_undefined ;
471 // table[(T_undefined<<4)+T_void] = T_undefined ;
472 // table[(T_undefined<<4)+T_String] = T_undefined ;
473 // table[(T_undefined<<4)+T_Object] = T_undefined ;
474 // table[(T_undefined<<4)+T_double] = T_undefined ;
475 // table[(T_undefined<<4)+T_float] = T_undefined ;
476 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
477 // table[(T_undefined<<4)+T_char] = T_undefined ;
478 // table[(T_undefined<<4)+T_int] = T_undefined ;
479 // table[(T_undefined<<4)+T_null] = T_undefined ;
481 // table[(T_byte<<4)+T_undefined] = T_undefined ;
482 // table[(T_byte<<4)+T_byte] = T_undefined ;
483 // table[(T_byte<<4)+T_long] = T_undefined ;
484 // table[(T_byte<<4)+T_short] = T_undefined ;
485 // table[(T_byte<<4)+T_void] = T_undefined ;
486 // table[(T_byte<<4)+T_String] = T_undefined ;
487 // table[(T_byte<<4)+T_Object] = T_undefined ;
488 // table[(T_byte<<4)+T_double] = T_undefined ;
489 // table[(T_byte<<4)+T_float] = T_undefined ;
490 // table[(T_byte<<4)+T_boolean] = T_undefined ;
491 // table[(T_byte<<4)+T_char] = T_undefined ;
492 // table[(T_byte<<4)+T_int] = T_undefined ;
493 // table[(T_byte<<4)+T_null] = T_undefined ;
495 // table[(T_long<<4)+T_undefined] = T_undefined ;
496 // table[(T_long<<4)+T_byte] = T_undefined;
497 // table[(T_long<<4)+T_long] = T_undefined ;
498 // table[(T_long<<4)+T_short] = T_undefined ;
499 // table[(T_long<<4)+T_void] = T_undefined ;
500 // table[(T_long<<4)+T_String] = T_undefined ;
501 // table[(T_long<<4)+T_Object] = T_undefined ;
502 // table[(T_long<<4)+T_double] = T_undefined ;
503 // table[(T_long<<4)+T_float] = T_undefined ;
504 // table[(T_long<<4)+T_boolean] = T_undefined ;
505 // table[(T_long<<4)+T_char] = T_undefined ;
506 // table[(T_long<<4)+T_int] = T_undefined ;
507 // table[(T_long<<4)+T_null] = T_undefined ;
509 // table[(T_short<<4)+T_undefined] = T_undefined ;
510 // table[(T_short<<4)+T_byte] = T_undefined ;
511 // table[(T_short<<4)+T_long] = T_undefined ;
512 // table[(T_short<<4)+T_short] = T_undefined ;
513 // table[(T_short<<4)+T_void] = T_undefined ;
514 // table[(T_short<<4)+T_String] = T_undefined ;
515 // table[(T_short<<4)+T_Object] = T_undefined ;
516 // table[(T_short<<4)+T_double] = T_undefined ;
517 // table[(T_short<<4)+T_float] = T_undefined ;
518 // table[(T_short<<4)+T_boolean] = T_undefined ;
519 // table[(T_short<<4)+T_char] = T_undefined ;
520 // table[(T_short<<4)+T_int] = T_undefined ;
521 // table[(T_short<<4)+T_null] = T_undefined ;
523 // table[(T_void<<4)+T_undefined] = T_undefined ;
524 // table[(T_void<<4)+T_byte] = T_undefined ;
525 // table[(T_void<<4)+T_long] = T_undefined ;
526 // table[(T_void<<4)+T_short] = T_undefined ;
527 // table[(T_void<<4)+T_void] = T_undefined ;
528 // table[(T_void<<4)+T_String] = T_undefined ;
529 // table[(T_void<<4)+T_Object] = T_undefined ;
530 // table[(T_void<<4)+T_double] = T_undefined ;
531 // table[(T_void<<4)+T_float] = T_undefined ;
532 // table[(T_void<<4)+T_boolean] = T_undefined ;
533 // table[(T_void<<4)+T_char] = T_undefined ;
534 // table[(T_void<<4)+T_int] = T_undefined ;
535 // table[(T_void<<4)+T_null] = T_undefined ;
537 // table[(T_String<<4)+T_undefined] = T_undefined ;
538 // table[(T_String<<4)+T_byte] = T_undefined ;
539 // table[(T_String<<4)+T_long] = T_undefined ;
540 // table[(T_String<<4)+T_short] = T_undefined ;
541 // table[(T_String<<4)+T_void] = T_undefined ;
542 // table[(T_String<<4)+T_String] = T_undefined ;
543 // table[(T_String<<4)+T_Object] = T_undefined ;
544 // table[(T_String<<4)+T_double] = T_undefined ;
545 // table[(T_String<<4)+T_float] = T_undefined ;
546 // table[(T_String<<4)+T_boolean] = T_undefined ;
547 // table[(T_String<<4)+T_char] = T_undefined ;
548 // table[(T_String<<4)+T_int] = T_undefined ;
549 // table[(T_String<<4)+T_null] = T_undefined ;
551 // table[(T_Object<<4)+T_undefined] = T_undefined ;
552 // table[(T_Object<<4)+T_byte] = T_undefined ;
553 // table[(T_Object<<4)+T_long] = T_undefined ;
554 // table[(T_Object<<4)+T_short] = T_undefined ;
555 // table[(T_Object<<4)+T_void] = T_undefined ;
556 // table[(T_Object<<4)+T_String] = T_undefined ;
557 // table[(T_Object<<4)+T_Object] = T_undefined ;
558 // table[(T_Object<<4)+T_double] = T_undefined ;
559 // table[(T_Object<<4)+T_float] = T_undefined ;
560 // table[(T_Object<<4)+T_boolean] = T_undefined ;
561 // table[(T_Object<<4)+T_char] = T_undefined ;
562 // table[(T_Object<<4)+T_int] = T_undefined ;
563 // table[(T_Object<<4)+T_null] = T_undefined ;
565 // table[(T_double<<4)+T_undefined] = T_undefined ;
566 // table[(T_double<<4)+T_byte] = T_undefined ;
567 // table[(T_double<<4)+T_long] = T_undefined ;
568 // table[(T_double<<4)+T_short] = T_undefined ;
569 // table[(T_double<<4)+T_void] = T_undefined ;
570 // table[(T_double<<4)+T_String] = T_undefined ;
571 // table[(T_double<<4)+T_Object] = T_undefined ;
572 // table[(T_double<<4)+T_double] = T_undefined ;
573 // table[(T_double<<4)+T_float] = T_undefined ;
574 // table[(T_double<<4)+T_boolean] = T_undefined ;
575 // table[(T_double<<4)+T_char] = T_undefined ;
576 // table[(T_double<<4)+T_int] = T_undefined;
577 // table[(T_double<<4)+T_null] = T_undefined ;
579 // table[(T_float<<4)+T_undefined] = T_undefined ;
580 // table[(T_float<<4)+T_byte] = T_undefined ;
581 // table[(T_float<<4)+T_long] = T_undefined ;
582 // table[(T_float<<4)+T_short] = T_undefined ;
583 // table[(T_float<<4)+T_void] = T_undefined ;
584 // table[(T_float<<4)+T_String] = T_undefined ;
585 // table[(T_float<<4)+T_Object] = T_undefined ;
586 // table[(T_float<<4)+T_double] = T_undefined ;
587 // table[(T_float<<4)+T_float] = T_undefined ;
588 // table[(T_float<<4)+T_boolean] = T_undefined ;
589 // table[(T_float<<4)+T_char] = T_undefined ;
590 // table[(T_float<<4)+T_int] = T_undefined ;
591 // table[(T_float<<4)+T_null] = T_undefined ;
593 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
594 // table[(T_boolean<<4)+T_byte] = T_undefined ;
595 // table[(T_boolean<<4)+T_long] = T_undefined ;
596 // table[(T_boolean<<4)+T_short] = T_undefined ;
597 // table[(T_boolean<<4)+T_void] = T_undefined ;
598 // table[(T_boolean<<4)+T_String] = T_undefined ;
599 // table[(T_boolean<<4)+T_Object] = T_undefined ;
600 // table[(T_boolean<<4)+T_double] = T_undefined ;
601 // table[(T_boolean<<4)+T_float] = T_undefined ;
602 table[(T_boolean << 4) + T_boolean] = (Boolean2Boolean << 12)
603 + (Boolean2Boolean << 4) + T_boolean;
604 // table[(T_boolean<<4)+T_char] = T_undefined ;
605 // table[(T_boolean<<4)+T_int] = T_undefined ;
606 // table[(T_boolean<<4)+T_null] = T_undefined ;
608 // table[(T_char<<4)+T_undefined] = T_undefined ;
609 // table[(T_char<<4)+T_byte] = T_undefined ;
610 // table[(T_char<<4)+T_long] = T_undefined;
611 // table[(T_char<<4)+T_short] = T_undefined ;
612 // table[(T_char<<4)+T_void] = T_undefined ;
613 // table[(T_char<<4)+T_String] = T_undefined ;
614 // table[(T_char<<4)+T_Object] = T_undefined ;
615 // table[(T_char<<4)+T_double] = T_undefined ;
616 // table[(T_char<<4)+T_float] = T_undefined ;
617 // table[(T_char<<4)+T_boolean] = T_undefined ;
618 // table[(T_char<<4)+T_char] = T_undefined ;
619 // table[(T_char<<4)+T_int] = T_undefined ;
620 // table[(T_char<<4)+T_null] = T_undefined ;
622 // table[(T_int<<4)+T_undefined] = T_undefined ;
623 // table[(T_int<<4)+T_byte] = T_undefined ;
624 // table[(T_int<<4)+T_long] = T_undefined ;
625 // table[(T_int<<4)+T_short] = T_undefined ;
626 // table[(T_int<<4)+T_void] = T_undefined ;
627 // table[(T_int<<4)+T_String] = T_undefined ;
628 // table[(T_int<<4)+T_Object] = T_undefined ;
629 // table[(T_int<<4)+T_double] = T_undefined ;
630 // table[(T_int<<4)+T_float] = T_undefined ;
631 // table[(T_int<<4)+T_boolean] = T_undefined ;
632 // table[(T_int<<4)+T_char] = T_undefined ;
633 // table[(T_int<<4)+T_int] = T_undefined ;
634 // table[(T_int<<4)+T_null] = T_undefined ;
636 // table[(T_null<<4)+T_undefined] = T_undefined ;
637 // table[(T_null<<4)+T_byte] = T_undefined ;
638 // table[(T_null<<4)+T_long] = T_undefined ;
639 // table[(T_null<<4)+T_short] = T_undefined ;
640 // table[(T_null<<4)+T_void] = T_undefined ;
641 // table[(T_null<<4)+T_String] = T_undefined ;
642 // table[(T_null<<4)+T_Object] = T_undefined ;
643 // table[(T_null<<4)+T_double] = T_undefined ;
644 // table[(T_null<<4)+T_float] = T_undefined ;
645 // table[(T_null<<4)+T_boolean] = T_undefined ;
646 // table[(T_null<<4)+T_char] = T_undefined ;
647 // table[(T_null<<4)+T_int] = T_undefined ;
648 // table[(T_null<<4)+T_null] = T_undefined ;
652 public static final int[] get_DIVIDE() {
654 // the code is an int
655 // (cast) left Op (cast) rigth --> result
656 // 0000 0000 0000 0000 0000
659 // int[] table = new int[16*16] ;
664 public static final int[] get_EQUAL_EQUAL() {
666 // the code is an int
667 // (cast) left Op (cast) rigth --> result
668 // 0000 0000 0000 0000 0000
671 int[] table = new int[16 * 16];
673 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
674 // table[(T_undefined<<4)+T_byte] = T_undefined ;
675 // table[(T_undefined<<4)+T_long] = T_undefined ;
676 // table[(T_undefined<<4)+T_short] = T_undefined ;
677 // table[(T_undefined<<4)+T_void] = T_undefined ;
678 // table[(T_undefined<<4)+T_String] = T_undefined ;
679 // table[(T_undefined<<4)+T_Object] = T_undefined ;
680 // table[(T_undefined<<4)+T_double] = T_undefined ;
681 // table[(T_undefined<<4)+T_float] = T_undefined ;
682 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
683 // table[(T_undefined<<4)+T_char] = T_undefined ;
684 // table[(T_undefined<<4)+T_int] = T_undefined ;
685 // table[(T_undefined<<4)+T_null] = T_undefined ;
687 // table[(T_byte<<4)+T_undefined] = T_undefined ;
688 table[(T_byte << 4) + T_byte] = (Byte2Int << 12) + (Byte2Int << 4)
690 table[(T_byte << 4) + T_long] = (Byte2Long << 12) + (Long2Long << 4)
692 table[(T_byte << 4) + T_short] = (Byte2Int << 12) + (Short2Int << 4)
694 // table[(T_byte<<4)+T_void] = T_undefined ;
695 // table[(T_byte<<4)+T_String] = T_undefined ;
696 // table[(T_byte<<4)+T_Object] = T_undefined ;
697 table[(T_byte << 4) + T_double] = (Byte2Double << 12)
698 + (Double2Double << 4) + T_boolean;
699 table[(T_byte << 4) + T_float] = (Byte2Float << 12)
700 + (Float2Float << 4) + T_boolean;
701 // table[(T_byte<<4)+T_boolean] = T_undefined ;
702 table[(T_byte << 4) + T_char] = (Byte2Int << 12) + (Char2Int << 4)
704 table[(T_byte << 4) + T_int] = (Byte2Int << 12) + (Int2Int << 4)
706 // table[(T_byte<<4)+T_null] = T_undefined ;
708 // table[(T_long<<4)+T_undefined] = T_undefined ;
709 table[(T_long << 4) + T_byte] = (Long2Long << 12) + (Byte2Long << 4)
711 table[(T_long << 4) + T_long] = (Long2Long << 12) + (Long2Long << 4)
713 table[(T_long << 4) + T_short] = (Long2Long << 12) + (Short2Long << 4)
715 // table[(T_long<<4)+T_void] = T_undefined ;
716 // table[(T_long<<4)+T_String] = T_undefined ;
717 // table[(T_long<<4)+T_Object] = T_undefined ;
718 table[(T_long << 4) + T_double] = (Long2Double << 12)
719 + (Double2Double << 4) + T_boolean;
720 table[(T_long << 4) + T_float] = (Long2Float << 12)
721 + (Float2Float << 4) + T_boolean;
722 // table[(T_long<<4)+T_boolean] = T_undefined ;
723 table[(T_long << 4) + T_char] = (Long2Long << 12) + (Char2Long << 4)
725 table[(T_long << 4) + T_int] = (Long2Long << 12) + (Int2Long << 4)
727 // table[(T_long<<4)+T_null] = T_undefined ;
729 // table[(T_short<<4)+T_undefined] = T_undefined ;
730 table[(T_short << 4) + T_byte] = (Short2Int << 12) + (Byte2Int << 4)
732 table[(T_short << 4) + T_long] = (Short2Long << 12) + (Long2Long << 4)
734 table[(T_short << 4) + T_short] = (Short2Int << 12) + (Short2Int << 4)
736 // table[(T_short<<4)+T_void] = T_undefined ;
737 // table[(T_short<<4)+T_String] = T_undefined ;
738 // table[(T_short<<4)+T_Object] = T_undefined ;
739 table[(T_short << 4) + T_double] = (Short2Double << 12)
740 + (Double2Double << 4) + T_boolean;
741 table[(T_short << 4) + T_float] = (Short2Float << 12)
742 + (Float2Float << 4) + T_boolean;
743 // table[(T_short<<4)+T_boolean] = T_undefined ;
744 table[(T_short << 4) + T_char] = (Short2Int << 12) + (Char2Int << 4)
746 table[(T_short << 4) + T_int] = (Short2Int << 12) + (Int2Int << 4)
748 // table[(T_short<<4)+T_null] = T_undefined ;
750 // table[(T_void<<4)+T_undefined] = T_undefined ;
751 // table[(T_void<<4)+T_byte] = T_undefined ;
752 // table[(T_void<<4)+T_long] = T_undefined ;
753 // table[(T_void<<4)+T_short] = T_undefined ;
754 // table[(T_void<<4)+T_void] = T_undefined ;
755 // table[(T_void<<4)+T_String] = T_undefined ;
756 // table[(T_void<<4)+T_Object] = T_undefined ;
757 // table[(T_void<<4)+T_double] = T_undefined ;
758 // table[(T_void<<4)+T_float] = T_undefined ;
759 // table[(T_void<<4)+T_boolean] = T_undefined ;
760 // table[(T_void<<4)+T_char] = T_undefined ;
761 // table[(T_void<<4)+T_int] = T_undefined ;
762 // table[(T_void<<4)+T_null] = T_undefined ;
764 // table[(T_String<<4)+T_undefined] = T_undefined ;
765 // table[(T_String<<4)+T_byte] = T_undefined ;
766 // table[(T_String<<4)+T_long] = T_undefined ;
767 // table[(T_String<<4)+T_short] = T_undefined ;
768 // table[(T_String<<4)+T_void] = T_undefined ;
769 table[(T_String << 4) + T_String] = /* String2Object String2Object */
770 (T_Object << 16) + (T_String << 12) + (T_Object << 8) + (T_String << 4)
772 table[(T_String << 4) + T_Object] = /* String2Object Object2Object */
773 (T_Object << 16) + (T_String << 12) + (T_Object << 8) + (T_Object << 4)
775 // table[(T_String<<4)+T_double] = T_undefined ;
776 // table[(T_String<<4)+T_float] = T_undefined ;
777 // table[(T_String<<4)+T_boolean] = T_undefined ;
778 // table[(T_String<<4)+T_char] = T_undefined ;
779 // table[(T_String<<4)+T_int] = T_undefined ;
780 table[(T_String << 4) + T_null] = /* Object2String null2Object */
781 (T_Object << 16) + (T_String << 12) + (T_Object << 8) + (T_null << 4)
784 // table[(T_Object<<4)+T_undefined] = T_undefined ;
785 // table[(T_Object<<4)+T_byte] = T_undefined ;
786 // table[(T_Object<<4)+T_long] = T_undefined ;
787 // table[(T_Object<<4)+T_short] = T_undefined ;
788 // table[(T_Object<<4)+T_void] = T_undefined ;
789 table[(T_Object << 4) + T_String] = /* Object2Object String2Object */
790 (T_Object << 16) + (T_Object << 12) + (T_Object << 8) + (T_String << 4)
792 table[(T_Object << 4) + T_Object] = /* Object2Object Object2Object */
793 (T_Object << 16) + (T_Object << 12) + (T_Object << 8) + (T_Object << 4)
795 // table[(T_Object<<4)+T_double] = T_undefined ;
796 // table[(T_Object<<4)+T_float] = T_undefined ;
797 // table[(T_Object<<4)+T_boolean] = T_undefined ;
798 // table[(T_Object<<4)+T_char] = T_undefined ;
799 // table[(T_Object<<4)+T_int] = T_undefined ;
800 table[(T_Object << 4) + T_null] = /* Object2Object null2Object */
801 (T_Object << 16) + (T_Object << 12) + (T_Object << 8) + (T_null << 4)
804 // table[(T_double<<4)+T_undefined] = T_undefined ;
805 table[(T_double << 4) + T_byte] = (Double2Double << 12)
806 + (Byte2Double << 4) + T_boolean;
807 table[(T_double << 4) + T_long] = (Double2Double << 12)
808 + (Long2Double << 4) + T_boolean;
809 table[(T_double << 4) + T_short] = (Double2Double << 12)
810 + (Short2Double << 4) + T_boolean;
811 // table[(T_double<<4)+T_void] = T_undefined ;
812 // table[(T_double<<4)+T_String] = T_undefined ;
813 // table[(T_double<<4)+T_Object] = T_undefined ;
814 table[(T_double << 4) + T_double] = (Double2Double << 12)
815 + (Double2Double << 4) + T_boolean;
816 table[(T_double << 4) + T_float] = (Double2Double << 12)
817 + (Float2Double << 4) + T_boolean;
818 // table[(T_double<<4)+T_boolean] = T_undefined ;
819 table[(T_double << 4) + T_char] = (Double2Double << 12)
820 + (Char2Double << 4) + T_boolean;
821 table[(T_double << 4) + T_int] = (Double2Double << 12)
822 + (Int2Double << 4) + T_boolean;
823 // table[(T_double<<4)+T_null] = T_undefined ;
825 // table[(T_float<<4)+T_undefined] = T_undefined ;
826 table[(T_float << 4) + T_byte] = (Float2Float << 12)
827 + (Byte2Float << 4) + T_boolean;
828 table[(T_float << 4) + T_long] = (Float2Float << 12)
829 + (Long2Float << 4) + T_boolean;
830 table[(T_float << 4) + T_short] = (Float2Float << 12)
831 + (Short2Float << 4) + T_boolean;
832 // table[(T_float<<4)+T_void] = T_undefined ;
833 // table[(T_float<<4)+T_String] = T_undefined ;
834 // table[(T_float<<4)+T_Object] = T_undefined ;
835 table[(T_float << 4) + T_double] = (Float2Double << 12)
836 + (Double2Double << 4) + T_boolean;
837 table[(T_float << 4) + T_float] = (Float2Float << 12)
838 + (Float2Float << 4) + T_boolean;
839 // table[(T_float<<4)+T_boolean] = T_undefined ;
840 table[(T_float << 4) + T_char] = (Float2Float << 12)
841 + (Char2Float << 4) + T_boolean;
842 table[(T_float << 4) + T_int] = (Float2Float << 12) + (Int2Float << 4)
844 // table[(T_float<<4)+T_null] = T_undefined ;
846 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
847 // table[(T_boolean<<4)+T_byte] = T_undefined ;
848 // table[(T_boolean<<4)+T_long] = T_undefined ;
849 // table[(T_boolean<<4)+T_short] = T_undefined ;
850 // table[(T_boolean<<4)+T_void] = T_undefined ;
851 // table[(T_boolean<<4)+T_String] = T_undefined ;
852 // table[(T_boolean<<4)+T_Object] = T_undefined ;
853 // table[(T_boolean<<4)+T_double] = T_undefined ;
854 // table[(T_boolean<<4)+T_float] = T_undefined ;
855 table[(T_boolean << 4) + T_boolean] = (Boolean2Boolean << 12)
856 + (Boolean2Boolean << 4) + T_boolean;
857 // table[(T_boolean<<4)+T_char] = T_undefined ;
858 // table[(T_boolean<<4)+T_int] = T_undefined ;
859 // table[(T_boolean<<4)+T_null] = T_undefined ;
861 // table[(T_char<<4)+T_undefined] = T_undefined ;
862 table[(T_char << 4) + T_byte] = (Char2Int << 12) + (Byte2Int << 4)
864 table[(T_char << 4) + T_long] = (Char2Long << 12) + (Long2Long << 4)
866 table[(T_char << 4) + T_short] = (Char2Int << 12) + (Short2Int << 4)
868 // table[(T_char<<4)+T_void] = T_undefined ;
869 // table[(T_char<<4)+T_String] = T_undefined ;
870 // table[(T_char<<4)+T_Object] = T_undefined ;
871 table[(T_char << 4) + T_double] = (Char2Double << 12)
872 + (Double2Double << 4) + T_boolean;
873 table[(T_char << 4) + T_float] = (Char2Float << 12)
874 + (Float2Float << 4) + T_boolean;
875 // table[(T_char<<4)+T_boolean] = T_undefined ;
876 table[(T_char << 4) + T_char] = (Char2Int << 12) + (Char2Int << 4)
878 table[(T_char << 4) + T_int] = (Char2Int << 12) + (Int2Int << 4)
880 // table[(T_char<<4)+T_null] = T_undefined ;
882 // table[(T_int<<4)+T_undefined] = T_undefined ;
883 table[(T_int << 4) + T_byte] = (Int2Int << 12) + (Byte2Int << 4)
885 table[(T_int << 4) + T_long] = (Int2Long << 12) + (Long2Long << 4)
887 table[(T_int << 4) + T_short] = (Int2Int << 12) + (Short2Int << 4)
889 // table[(T_int<<4)+T_void] = T_undefined ;
890 // table[(T_int<<4)+T_String] = T_undefined ;
891 // table[(T_int<<4)+T_Object] = T_undefined ;
892 table[(T_int << 4) + T_double] = (Int2Double << 12)
893 + (Double2Double << 4) + T_boolean;
894 table[(T_int << 4) + T_float] = (Int2Float << 12) + (Float2Float << 4)
896 // table[(T_int<<4)+T_boolean] = T_undefined ;
897 table[(T_int << 4) + T_char] = (Int2Int << 12) + (Char2Int << 4)
899 table[(T_int << 4) + T_int] = (Int2Int << 12) + (Int2Int << 4)
901 // table[(T_int<<4)+T_null] = T_undefined ;
903 // table[(T_null<<4)+T_undefined] = T_undefined ;
904 // table[(T_null<<4)+T_byte] = T_undefined ;
905 // table[(T_null<<4)+T_long] = T_undefined ;
906 // table[(T_null<<4)+T_short] = T_undefined ;
907 // table[(T_null<<4)+T_void] = T_undefined ;
908 table[(T_null << 4) + T_String] = /* null2Object String2Object */
909 (T_Object << 16) + (T_null << 12) + (T_Object << 8) + (T_String << 4)
911 table[(T_null << 4) + T_Object] = /* null2Object Object2Object */
912 (T_Object << 16) + (T_null << 12) + (T_Object << 8) + (T_Object << 4)
915 // table[(T_null<<4)+T_double] = T_undefined ;
916 // table[(T_null<<4)+T_float] = T_undefined ;
917 // table[(T_null<<4)+T_boolean] = T_undefined ;
918 // table[(T_null<<4)+T_char] = T_undefined ;
919 // table[(T_null<<4)+T_int] = T_undefined ;
920 table[(T_null << 4) + T_null] = /* null2Object null2Object */
921 (T_Object << 16) + (T_null << 12) + (T_Object << 8) + (T_null << 4)
926 public static final int[] get_GREATER() {
928 // the code is an int
929 // (cast) left Op (cast) rigth --> result
930 // 0000 0000 0000 0000 0000
933 // int[] table = new int[16*16] ;
937 public static final int[] get_GREATER_EQUAL() {
939 // the code is an int
940 // (cast) left Op (cast) rigth --> result
941 // 0000 0000 0000 0000 0000
944 // int[] table = new int[16*16] ;
948 public static final int[] get_LEFT_SHIFT() {
950 // the code is an int
951 // (cast) left Op (cast) rigth --> result
952 // 0000 0000 0000 0000 0000
955 int[] table = new int[16 * 16];
957 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
958 // table[(T_undefined<<4)+T_byte] = T_undefined ;
959 // table[(T_undefined<<4)+T_long] = T_undefined ;
960 // table[(T_undefined<<4)+T_short] = T_undefined ;
961 // table[(T_undefined<<4)+T_void] = T_undefined ;
962 // table[(T_undefined<<4)+T_String] = T_undefined ;
963 // table[(T_undefined<<4)+T_Object] = T_undefined ;
964 // table[(T_undefined<<4)+T_double] = T_undefined ;
965 // table[(T_undefined<<4)+T_float] = T_undefined ;
966 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
967 // table[(T_undefined<<4)+T_char] = T_undefined ;
968 // table[(T_undefined<<4)+T_int] = T_undefined ;
969 // table[(T_undefined<<4)+T_null] = T_undefined ;
971 // table[(T_byte<<4)+T_undefined] = T_undefined ;
972 table[(T_byte << 4) + T_byte] = (Byte2Int << 12) + (Byte2Int << 4)
974 table[(T_byte << 4) + T_long] = (Byte2Int << 12) + (Long2Int << 4)
976 table[(T_byte << 4) + T_short] = (Byte2Int << 12) + (Short2Int << 4)
978 // table[(T_byte<<4)+T_void] = T_undefined ;
979 // table[(T_byte<<4)+T_String] = T_undefined ;
980 // table[(T_byte<<4)+T_Object] = T_undefined ;
981 // table[(T_byte<<4)+T_double] = T_undefined ;
982 // table[(T_byte<<4)+T_float] = T_undefined ;
983 // table[(T_byte<<4)+T_boolean] = T_undefined ;
984 table[(T_byte << 4) + T_char] = (Byte2Int << 12) + (Char2Int << 4)
986 table[(T_byte << 4) + T_int] = (Byte2Int << 12) + (Int2Int << 4)
988 // table[(T_byte<<4)+T_null] = T_undefined ;
990 // table[(T_long<<4)+T_undefined] = T_undefined ;
991 table[(T_long << 4) + T_byte] = (Long2Long << 12) + (Byte2Int << 4)
993 table[(T_long << 4) + T_long] = (Long2Long << 12) + (Long2Int << 4)
995 table[(T_long << 4) + T_short] = (Long2Long << 12) + (Short2Int << 4)
997 // table[(T_long<<4)+T_void] = T_undefined ;
998 // table[(T_long<<4)+T_String] = T_undefined ;
999 // table[(T_long<<4)+T_Object] = T_undefined ;
1000 // table[(T_long<<4)+T_double] = T_undefined ;
1001 // table[(T_long<<4)+T_float] = T_undefined ;
1002 // table[(T_long<<4)+T_boolean] = T_undefined ;
1003 table[(T_long << 4) + T_char] = (Long2Long << 12) + (Char2Int << 4)
1005 table[(T_long << 4) + T_int] = (Long2Long << 12) + (Int2Int << 4)
1007 // table[(T_long<<4)+T_null] = T_undefined ;
1009 // table[(T_short<<4)+T_undefined] = T_undefined ;
1010 table[(T_short << 4) + T_byte] = (Short2Int << 12) + (Byte2Int << 4)
1012 table[(T_short << 4) + T_long] = (Short2Int << 12) + (Long2Int << 4)
1014 table[(T_short << 4) + T_short] = (Short2Int << 12) + (Short2Int << 4)
1016 // table[(T_short<<4)+T_void] = T_undefined ;
1017 // table[(T_short<<4)+T_String] = T_undefined ;
1018 // table[(T_short<<4)+T_Object] = T_undefined ;
1019 // table[(T_short<<4)+T_double] = T_undefined ;
1020 // table[(T_short<<4)+T_float] = T_undefined ;
1021 // table[(T_short<<4)+T_boolean] = T_undefined ;
1022 table[(T_short << 4) + T_char] = (Short2Int << 12) + (Char2Int << 4)
1024 table[(T_short << 4) + T_int] = (Short2Int << 12) + (Int2Int << 4)
1026 // table[(T_short<<4)+T_null] = T_undefined ;
1028 // table[(T_void<<4)+T_undefined] = T_undefined ;
1029 // table[(T_void<<4)+T_byte] = T_undefined ;
1030 // table[(T_void<<4)+T_long] = T_undefined ;
1031 // table[(T_void<<4)+T_short] = T_undefined ;
1032 // table[(T_void<<4)+T_void] = T_undefined ;
1033 // table[(T_void<<4)+T_String] = T_undefined ;
1034 // table[(T_void<<4)+T_Object] = T_undefined ;
1035 // table[(T_void<<4)+T_double] = T_undefined ;
1036 // table[(T_void<<4)+T_float] = T_undefined ;
1037 // table[(T_void<<4)+T_boolean] = T_undefined ;
1038 // table[(T_void<<4)+T_char] = T_undefined ;
1039 // table[(T_void<<4)+T_int] = T_undefined ;
1040 // table[(T_void<<4)+T_null] = T_undefined ;
1042 // table[(T_String<<4)+T_undefined] = T_undefined ;
1043 // table[(T_String<<4)+T_byte] = T_undefined ;
1044 // table[(T_String<<4)+T_long] = T_undefined ;
1045 // table[(T_String<<4)+T_short] = T_undefined ;
1046 // table[(T_String<<4)+T_void] = T_undefined ;
1047 // table[(T_String<<4)+T_String] = T_undefined ;
1048 // table[(T_String<<4)+T_Object] = T_undefined ;
1049 // table[(T_String<<4)+T_double] = T_undefined ;
1050 // table[(T_String<<4)+T_float] = T_undefined ;
1051 // table[(T_String<<4)+T_boolean] = T_undefined ;
1052 // table[(T_String<<4)+T_char] = T_undefined ;
1053 // table[(T_String<<4)+T_int] = T_undefined ;
1054 // table[(T_String<<4)+T_null] = T_undefined ;
1056 // table[(T_Object<<4)+T_undefined] = T_undefined ;
1057 // table[(T_Object<<4)+T_byte] = T_undefined ;
1058 // table[(T_Object<<4)+T_long] = T_undefined ;
1059 // table[(T_Object<<4)+T_short] = T_undefined ;
1060 // table[(T_Object<<4)+T_void] = T_undefined ;
1061 // table[(T_Object<<4)+T_String] = T_undefined ;
1062 // table[(T_Object<<4)+T_Object] = T_undefined ;
1063 // table[(T_Object<<4)+T_double] = T_undefined ;
1064 // table[(T_Object<<4)+T_float] = T_undefined ;
1065 // table[(T_Object<<4)+T_boolean] = T_undefined ;
1066 // table[(T_Object<<4)+T_char] = T_undefined ;
1067 // table[(T_Object<<4)+T_int] = T_undefined ;
1068 // table[(T_Object<<4)+T_null] = T_undefined ;
1070 // table[(T_double<<4)+T_undefined] = T_undefined ;
1071 // table[(T_double<<4)+T_byte] = T_undefined ;
1072 // table[(T_double<<4)+T_long] = T_undefined ;
1073 // table[(T_double<<4)+T_short] = T_undefined ;
1074 // table[(T_double<<4)+T_void] = T_undefined ;
1075 // table[(T_double<<4)+T_String] = T_undefined ;
1076 // table[(T_double<<4)+T_Object] = T_undefined ;
1077 // table[(T_double<<4)+T_double] = T_undefined ;
1078 // table[(T_double<<4)+T_float] = T_undefined ;
1079 // table[(T_double<<4)+T_boolean] = T_undefined ;
1080 // table[(T_double<<4)+T_char] = T_undefined ;
1081 // table[(T_double<<4)+T_int] = T_undefined;
1082 // table[(T_double<<4)+T_null] = T_undefined ;
1084 // table[(T_float<<4)+T_undefined] = T_undefined ;
1085 // table[(T_float<<4)+T_byte] = T_undefined ;
1086 // table[(T_float<<4)+T_long] = T_undefined ;
1087 // table[(T_float<<4)+T_short] = T_undefined ;
1088 // table[(T_float<<4)+T_void] = T_undefined ;
1089 // table[(T_float<<4)+T_String] = T_undefined ;
1090 // table[(T_float<<4)+T_Object] = T_undefined ;
1091 // table[(T_float<<4)+T_double] = T_undefined ;
1092 // table[(T_float<<4)+T_float] = T_undefined ;
1093 // table[(T_float<<4)+T_boolean] = T_undefined ;
1094 // table[(T_float<<4)+T_char] = T_undefined ;
1095 // table[(T_float<<4)+T_int] = T_undefined ;
1096 // table[(T_float<<4)+T_null] = T_undefined ;
1098 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
1099 // table[(T_boolean<<4)+T_byte] = T_undefined ;
1100 // table[(T_boolean<<4)+T_long] = T_undefined ;
1101 // table[(T_boolean<<4)+T_short] = T_undefined ;
1102 // table[(T_boolean<<4)+T_void] = T_undefined ;
1103 // table[(T_boolean<<4)+T_String] = T_undefined ;
1104 // table[(T_boolean<<4)+T_Object] = T_undefined ;
1105 // table[(T_boolean<<4)+T_double] = T_undefined ;
1106 // table[(T_boolean<<4)+T_float] = T_undefined ;
1107 // table[(T_boolean<<4)+T_boolean] = T_undefined ;
1108 // table[(T_boolean<<4)+T_char] = T_undefined ;
1109 // table[(T_boolean<<4)+T_int] = T_undefined ;
1110 // table[(T_boolean<<4)+T_null] = T_undefined ;
1112 // table[(T_char<<4)+T_undefined] = T_undefined ;
1113 table[(T_char << 4) + T_byte] = (Char2Int << 12) + (Byte2Int << 4)
1115 table[(T_char << 4) + T_long] = (Char2Int << 12) + (Long2Int << 4)
1117 table[(T_char << 4) + T_short] = (Char2Int << 12) + (Short2Int << 4)
1119 // table[(T_char<<4)+T_void] = T_undefined ;
1120 // table[(T_char<<4)+T_String] = T_undefined ;
1121 // table[(T_char<<4)+T_Object] = T_undefined ;
1122 // table[(T_char<<4)+T_double] = T_undefined ;
1123 // table[(T_char<<4)+T_float] = T_undefined ;
1124 // table[(T_char<<4)+T_boolean] = T_undefined ;
1125 table[(T_char << 4) + T_char] = (Char2Int << 12) + (Char2Int << 4)
1127 table[(T_char << 4) + T_int] = (Char2Int << 12) + (Int2Int << 4)
1129 // table[(T_char<<4)+T_null] = T_undefined ;
1131 // table[(T_int<<4)+T_undefined] = T_undefined ;
1132 table[(T_int << 4) + T_byte] = (Int2Int << 12) + (Byte2Int << 4)
1134 table[(T_int << 4) + T_long] = (Int2Int << 12) + (Long2Int << 4)
1136 table[(T_int << 4) + T_short] = (Int2Int << 12) + (Short2Int << 4)
1138 // table[(T_int<<4)+T_void] = T_undefined ;
1139 // table[(T_int<<4)+T_String] = T_undefined ;
1140 // table[(T_int<<4)+T_Object] = T_undefined ;
1141 // table[(T_int<<4)+T_double] = T_undefined ;
1142 // table[(T_int<<4)+T_float] = T_undefined ;
1143 // table[(T_int<<4)+T_boolean] = T_undefined ;
1144 table[(T_int << 4) + T_char] = (Int2Int << 12) + (Char2Int << 4)
1146 table[(T_int << 4) + T_int] = (Int2Int << 12) + (Int2Int << 4) + T_int;
1147 // table[(T_int<<4)+T_null] = T_undefined ;
1149 // table[(T_null<<4)+T_undefined] = T_undefined ;
1150 // table[(T_null<<4)+T_byte] = T_undefined ;
1151 // table[(T_null<<4)+T_long] = T_undefined ;
1152 // table[(T_null<<4)+T_short] = T_undefined ;
1153 // table[(T_null<<4)+T_void] = T_undefined ;
1154 // table[(T_null<<4)+T_String] = T_undefined ;
1155 // table[(T_null<<4)+T_Object] = T_undefined ;
1156 // table[(T_null<<4)+T_double] = T_undefined ;
1157 // table[(T_null<<4)+T_float] = T_undefined ;
1158 // table[(T_null<<4)+T_boolean] = T_undefined ;
1159 // table[(T_null<<4)+T_char] = T_undefined ;
1160 // table[(T_null<<4)+T_int] = T_undefined ;
1161 // table[(T_null<<4)+T_null] = T_undefined ;
1166 public static final int[] get_LESS() {
1168 // the code is an int
1169 // (cast) left Op (cast) rigth --> result
1170 // 0000 0000 0000 0000 0000
1171 // <<16 <<12 <<8 <<4
1173 int[] table = new int[16 * 16];
1175 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
1176 // table[(T_undefined<<4)+T_byte] = T_undefined ;
1177 // table[(T_undefined<<4)+T_long] = T_undefined ;
1178 // table[(T_undefined<<4)+T_short] = T_undefined ;
1179 // table[(T_undefined<<4)+T_void] = T_undefined ;
1180 // table[(T_undefined<<4)+T_String] = T_undefined ;
1181 // table[(T_undefined<<4)+T_Object] = T_undefined ;
1182 // table[(T_undefined<<4)+T_double] = T_undefined ;
1183 // table[(T_undefined<<4)+T_float] = T_undefined ;
1184 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
1185 // table[(T_undefined<<4)+T_char] = T_undefined ;
1186 // table[(T_undefined<<4)+T_int] = T_undefined ;
1187 // table[(T_undefined<<4)+T_null] = T_undefined ;
1189 // table[(T_byte<<4)+T_undefined] = T_undefined ;
1190 table[(T_byte << 4) + T_byte] = (Byte2Int << 12) + (Byte2Int << 4)
1192 table[(T_byte << 4) + T_long] = (Byte2Long << 12) + (Long2Long << 4)
1194 table[(T_byte << 4) + T_short] = (Byte2Int << 12) + (Short2Int << 4)
1196 // table[(T_byte<<4)+T_void] = T_undefined ;
1197 // table[(T_byte<<4)+T_String] = T_undefined ;
1198 // table[(T_byte<<4)+T_Object] = T_undefined ;
1199 table[(T_byte << 4) + T_double] = (Byte2Double << 12)
1200 + (Double2Double << 4) + T_boolean;
1201 table[(T_byte << 4) + T_float] = (Byte2Float << 12)
1202 + (Float2Float << 4) + T_boolean;
1203 // table[(T_byte<<4)+T_boolean] = T_undefined ;
1204 table[(T_byte << 4) + T_char] = (Byte2Int << 12) + (Char2Int << 4)
1206 table[(T_byte << 4) + T_int] = (Byte2Int << 12) + (Int2Int << 4)
1208 // table[(T_byte<<4)+T_null] = T_undefined ;
1210 // table[(T_long<<4)+T_undefined] = T_undefined ;
1211 table[(T_long << 4) + T_byte] = (Long2Long << 12) + (Byte2Long << 4)
1213 table[(T_long << 4) + T_long] = (Long2Long << 12) + (Long2Long << 4)
1215 table[(T_long << 4) + T_short] = (Long2Long << 12) + (Short2Long << 4)
1217 // table[(T_long<<4)+T_void] = T_undefined ;
1218 // table[(T_long<<4)+T_String] = T_undefined ;
1219 // table[(T_long<<4)+T_Object] = T_undefined ;
1220 table[(T_long << 4) + T_double] = (Long2Double << 12)
1221 + (Double2Double << 4) + T_boolean;
1222 table[(T_long << 4) + T_float] = (Long2Float << 12)
1223 + (Float2Float << 4) + T_boolean;
1224 // table[(T_long<<4)+T_boolean] = T_undefined ;
1225 table[(T_long << 4) + T_char] = (Long2Long << 12) + (Char2Long << 4)
1227 table[(T_long << 4) + T_int] = (Long2Long << 12) + (Int2Long << 4)
1229 // table[(T_long<<4)+T_null] = T_undefined ;
1231 // table[(T_short<<4)+T_undefined] = T_undefined ;
1232 table[(T_short << 4) + T_byte] = (Short2Int << 12) + (Byte2Int << 4)
1234 table[(T_short << 4) + T_long] = (Short2Long << 12) + (Long2Long << 4)
1236 table[(T_short << 4) + T_short] = (Short2Int << 12) + (Short2Int << 4)
1238 // table[(T_short<<4)+T_void] = T_undefined ;
1239 // table[(T_short<<4)+T_String] = T_undefined ;
1240 // table[(T_short<<4)+T_Object] = T_undefined ;
1241 table[(T_short << 4) + T_double] = (Short2Double << 12)
1242 + (Double2Double << 4) + T_boolean;
1243 table[(T_short << 4) + T_float] = (Short2Float << 12)
1244 + (Float2Float << 4) + T_boolean;
1245 // table[(T_short<<4)+T_boolean] = T_undefined ;
1246 table[(T_short << 4) + T_char] = (Short2Int << 12) + (Char2Int << 4)
1248 table[(T_short << 4) + T_int] = (Short2Int << 12) + (Int2Int << 4)
1250 // table[(T_short<<4)+T_null] = T_undefined ;
1252 // table[(T_void<<4)+T_undefined] = T_undefined ;
1253 // table[(T_void<<4)+T_byte] = T_undefined ;
1254 // table[(T_void<<4)+T_long] = T_undefined ;
1255 // table[(T_void<<4)+T_short] = T_undefined ;
1256 // table[(T_void<<4)+T_void] = T_undefined ;
1257 // table[(T_void<<4)+T_String] = T_undefined ;
1258 // table[(T_void<<4)+T_Object] = T_undefined ;
1259 // table[(T_void<<4)+T_double] = T_undefined ;
1260 // table[(T_void<<4)+T_float] = T_undefined ;
1261 // table[(T_void<<4)+T_boolean] = T_undefined ;
1262 // table[(T_void<<4)+T_char] = T_undefined ;
1263 // table[(T_void<<4)+T_int] = T_undefined ;
1264 // table[(T_void<<4)+T_null] = T_undefined ;
1266 // table[(T_String<<4)+T_undefined] = T_undefined ;
1267 // table[(T_String<<4)+T_byte] = T_undefined ;
1268 // table[(T_String<<4)+T_long] = T_undefined ;
1269 // table[(T_String<<4)+T_short] = T_undefined ;
1270 // table[(T_String<<4)+T_void] = T_undefined ;
1271 // table[(T_String<<4)+T_String] = T_undefined ;
1272 // table[(T_String<<4)+T_Object] = T_undefined ;
1273 // table[(T_String<<4)+T_double] = T_undefined ;
1274 // table[(T_String<<4)+T_float] = T_undefined ;
1275 // table[(T_String<<4)+T_boolean] = T_undefined ;
1276 // table[(T_String<<4)+T_char] = T_undefined ;
1277 // table[(T_String<<4)+T_int] = T_undefined ;
1278 // table[(T_String<<4)+T_null] = T_undefined ;
1280 // table[(T_Object<<4)+T_undefined] = T_undefined ;
1281 // table[(T_Object<<4)+T_byte] = T_undefined ;
1282 // table[(T_Object<<4)+T_long] = T_undefined ;
1283 // table[(T_Object<<4)+T_short] = T_undefined ;
1284 // table[(T_Object<<4)+T_void] = T_undefined ;
1285 // table[(T_Object<<4)+T_String] = T_undefined ;
1286 // table[(T_Object<<4)+T_Object] = T_undefined ;
1287 // table[(T_Object<<4)+T_double] = T_undefined ;
1288 // table[(T_Object<<4)+T_float] = T_undefined ;
1289 // table[(T_Object<<4)+T_boolean] = T_undefined ;
1290 // table[(T_Object<<4)+T_char] = T_undefined ;
1291 // table[(T_Object<<4)+T_int] = T_undefined ;
1292 // table[(T_Object<<4)+T_null] = T_undefined ;
1294 // table[(T_double<<4)+T_undefined] = T_undefined ;
1295 table[(T_double << 4) + T_byte] = (Double2Double << 12)
1296 + (Byte2Double << 4) + T_boolean;
1297 table[(T_double << 4) + T_long] = (Double2Double << 12)
1298 + (Long2Double << 4) + T_boolean;
1299 table[(T_double << 4) + T_short] = (Double2Double << 12)
1300 + (Short2Double << 4) + T_boolean;
1301 // table[(T_double<<4)+T_void] = T_undefined ;
1302 // table[(T_double<<4)+T_String] = T_undefined ;
1303 // table[(T_double<<4)+T_Object] = T_undefined ;
1304 table[(T_double << 4) + T_double] = (Double2Double << 12)
1305 + (Double2Double << 4) + T_boolean;
1306 table[(T_double << 4) + T_float] = (Double2Double << 12)
1307 + (Float2Double << 4) + T_boolean;
1308 // table[(T_double<<4)+T_boolean] = T_undefined ;
1309 table[(T_double << 4) + T_char] = (Double2Double << 12)
1310 + (Char2Double << 4) + T_boolean;
1311 table[(T_double << 4) + T_int] = (Double2Double << 12)
1312 + (Int2Double << 4) + T_boolean;
1313 // table[(T_double<<4)+T_null] = T_undefined ;
1315 // table[(T_float<<4)+T_undefined] = T_undefined ;
1316 table[(T_float << 4) + T_byte] = (Float2Float << 12)
1317 + (Byte2Float << 4) + T_boolean;
1318 table[(T_float << 4) + T_long] = (Float2Float << 12)
1319 + (Long2Float << 4) + T_boolean;
1320 table[(T_float << 4) + T_short] = (Float2Float << 12)
1321 + (Short2Float << 4) + T_boolean;
1322 // table[(T_float<<4)+T_void] = T_undefined ;
1323 // table[(T_float<<4)+T_String] = T_undefined ;
1324 // table[(T_float<<4)+T_Object] = T_undefined ;
1325 table[(T_float << 4) + T_double] = (Float2Double << 12)
1326 + (Double2Double << 4) + T_boolean;
1327 table[(T_float << 4) + T_float] = (Float2Float << 12)
1328 + (Float2Float << 4) + T_boolean;
1329 // table[(T_float<<4)+T_boolean] = T_undefined ;
1330 table[(T_float << 4) + T_char] = (Float2Float << 12)
1331 + (Char2Float << 4) + T_boolean;
1332 table[(T_float << 4) + T_int] = (Float2Float << 12) + (Int2Float << 4)
1334 // table[(T_float<<4)+T_null] = T_undefined ;
1336 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
1337 // table[(T_boolean<<4)+T_byte] = T_undefined ;
1338 // table[(T_boolean<<4)+T_long] = T_undefined ;
1339 // table[(T_boolean<<4)+T_short] = T_undefined ;
1340 // table[(T_boolean<<4)+T_void] = T_undefined ;
1341 // table[(T_boolean<<4)+T_String] = T_undefined ;
1342 // table[(T_boolean<<4)+T_Object] = T_undefined ;
1343 // table[(T_boolean<<4)+T_double] = T_undefined ;
1344 // table[(T_boolean<<4)+T_float] = T_undefined ;
1345 // table[(T_boolean<<4)+T_boolean] = T_undefined ;
1346 // table[(T_boolean<<4)+T_char] = T_undefined ;
1347 // table[(T_boolean<<4)+T_int] = T_undefined ;
1348 // table[(T_boolean<<4)+T_null] = T_undefined ;
1350 // table[(T_char<<4)+T_undefined] = T_undefined ;
1351 table[(T_char << 4) + T_byte] = (Char2Int << 12) + (Byte2Int << 4)
1353 table[(T_char << 4) + T_long] = (Char2Long << 12) + (Long2Long << 4)
1355 table[(T_char << 4) + T_short] = (Char2Int << 12) + (Short2Int << 4)
1357 // table[(T_char<<4)+T_void] = T_undefined ;
1358 // table[(T_char<<4)+T_String] = T_undefined ;
1359 // table[(T_char<<4)+T_Object] = T_undefined ;
1360 table[(T_char << 4) + T_double] = (Char2Double << 12)
1361 + (Double2Double << 4) + T_boolean;
1362 table[(T_char << 4) + T_float] = (Char2Float << 12)
1363 + (Float2Float << 4) + T_boolean;
1364 // table[(T_char<<4)+T_boolean] = T_undefined ;
1365 table[(T_char << 4) + T_char] = (Char2Int << 12) + (Char2Int << 4)
1367 table[(T_char << 4) + T_int] = (Char2Int << 12) + (Int2Int << 4)
1369 // table[(T_char<<4)+T_null] = T_undefined ;
1371 // table[(T_int<<4)+T_undefined] = T_undefined ;
1372 table[(T_int << 4) + T_byte] = (Int2Int << 12) + (Byte2Int << 4)
1374 table[(T_int << 4) + T_long] = (Int2Long << 12) + (Long2Long << 4)
1376 table[(T_int << 4) + T_short] = (Int2Int << 12) + (Short2Int << 4)
1378 // table[(T_int<<4)+T_void] = T_undefined ;
1379 // table[(T_int<<4)+T_String] = T_undefined ;
1380 // table[(T_int<<4)+T_Object] = T_undefined ;
1381 table[(T_int << 4) + T_double] = (Int2Double << 12)
1382 + (Double2Double << 4) + T_boolean;
1383 table[(T_int << 4) + T_float] = (Int2Float << 12) + (Float2Float << 4)
1385 // table[(T_int<<4)+T_boolean] = T_undefined ;
1386 table[(T_int << 4) + T_char] = (Int2Int << 12) + (Char2Int << 4)
1388 table[(T_int << 4) + T_int] = (Int2Int << 12) + (Int2Int << 4)
1390 // table[(T_int<<4)+T_null] = T_undefined ;
1392 // table[(T_null<<4)+T_undefined] = T_undefined ;
1393 // table[(T_null<<4)+T_byte] = T_undefined ;
1394 // table[(T_null<<4)+T_long] = T_undefined ;
1395 // table[(T_null<<4)+T_short] = T_undefined ;
1396 // table[(T_null<<4)+T_void] = T_undefined ;
1397 // table[(T_null<<4)+T_String] = T_undefined ;
1398 // table[(T_null<<4)+T_Object] = T_undefined ;
1399 // table[(T_null<<4)+T_double] = T_undefined ;
1400 // table[(T_null<<4)+T_float] = T_undefined ;
1401 // table[(T_null<<4)+T_boolean] = T_undefined ;
1402 // table[(T_null<<4)+T_char] = T_undefined ;
1403 // table[(T_null<<4)+T_int] = T_undefined ;
1404 // table[(T_null<<4)+T_null] = T_undefined ;
1409 public static final int[] get_LESS_EQUAL() {
1411 // the code is an int
1412 // (cast) left Op (cast) rigth --> result
1413 // 0000 0000 0000 0000 0000
1414 // <<16 <<12 <<8 <<4
1416 // int[] table = new int[16*16] ;
1420 public static final int[] get_MINUS() {
1422 // the code is an int
1423 // (cast) left Op (cast) rigth --> result
1424 // 0000 0000 0000 0000 0000
1425 // <<16 <<12 <<8 <<4
1427 int[] table = new int[16 * 16];
1429 table = (int[]) get_PLUS().clone();
1432 table[(T_String << 4) + T_byte] = T_undefined;
1433 table[(T_String << 4) + T_long] = T_undefined;
1434 table[(T_String << 4) + T_short] = T_undefined;
1435 table[(T_String << 4) + T_void] = T_undefined;
1436 table[(T_String << 4) + T_String] = T_undefined;
1437 table[(T_String << 4) + T_Object] = T_undefined;
1438 table[(T_String << 4) + T_double] = T_undefined;
1439 table[(T_String << 4) + T_float] = T_undefined;
1440 table[(T_String << 4) + T_boolean] = T_undefined;
1441 table[(T_String << 4) + T_char] = T_undefined;
1442 table[(T_String << 4) + T_int] = T_undefined;
1443 table[(T_String << 4) + T_null] = T_undefined;
1445 table[(T_byte << 4) + T_String] = T_undefined;
1446 table[(T_long << 4) + T_String] = T_undefined;
1447 table[(T_short << 4) + T_String] = T_undefined;
1448 table[(T_void << 4) + T_String] = T_undefined;
1449 table[(T_Object << 4) + T_String] = T_undefined;
1450 table[(T_double << 4) + T_String] = T_undefined;
1451 table[(T_float << 4) + T_String] = T_undefined;
1452 table[(T_boolean << 4) + T_String] = T_undefined;
1453 table[(T_char << 4) + T_String] = T_undefined;
1454 table[(T_int << 4) + T_String] = T_undefined;
1455 table[(T_null << 4) + T_String] = T_undefined;
1457 table[(T_null << 4) + T_null] = T_undefined;
1462 public static final int[] get_MULTIPLY() {
1464 // the code is an int
1465 // (cast) left Op (cast) rigth --> result
1466 // 0000 0000 0000 0000 0000
1467 // <<16 <<12 <<8 <<4
1469 // int[] table = new int[16*16] ;
1473 public static final int[] get_OR() {
1475 // the code is an int
1476 // (cast) left Op (cast) rigth --> result
1477 // 0000 0000 0000 0000 0000
1478 // <<16 <<12 <<8 <<4
1480 // int[] table = new int[16*16] ;
1484 public static final int[] get_OR_OR() {
1486 // the code is an int
1487 // (cast) left Op (cast) rigth --> result
1488 // 0000 0000 0000 0000 0000
1489 // <<16 <<12 <<8 <<4
1491 // int[] table = new int[16*16] ;
1492 return get_AND_AND();
1495 public static final int[] get_PLUS() {
1497 // the code is an int
1498 // (cast) left Op (cast) rigth --> result
1499 // 0000 0000 0000 0000 0000
1500 // <<16 <<12 <<8 <<4
1502 int[] table = new int[16 * 16];
1504 // table[(T_undefined<<4)+T_undefined] = T_undefined ;
1505 // table[(T_undefined<<4)+T_byte] = T_undefined ;
1506 // table[(T_undefined<<4)+T_long] = T_undefined ;
1507 // table[(T_undefined<<4)+T_short] = T_undefined ;
1508 // table[(T_undefined<<4)+T_void] = T_undefined ;
1509 // table[(T_undefined<<4)+T_String] = T_undefined ;
1510 // table[(T_undefined<<4)+T_Object] = T_undefined ;
1511 // table[(T_undefined<<4)+T_double] = T_undefined ;
1512 // table[(T_undefined<<4)+T_float] = T_undefined ;
1513 // table[(T_undefined<<4)+T_boolean] = T_undefined ;
1514 // table[(T_undefined<<4)+T_char] = T_undefined ;
1515 // table[(T_undefined<<4)+T_int] = T_undefined ;
1516 // table[(T_undefined<<4)+T_null] = T_undefined ;
1518 // table[(T_byte<<4)+T_undefined] = T_undefined ;
1519 table[(T_byte << 4) + T_byte] = (Byte2Int << 12) + (Byte2Int << 4)
1521 table[(T_byte << 4) + T_long] = (Byte2Long << 12) + (Long2Long << 4)
1523 table[(T_byte << 4) + T_short] = (Byte2Int << 12) + (Short2Int << 4)
1525 // table[(T_byte<<4)+T_void] = T_undefined ;
1526 table[(T_byte << 4) + T_String] = (Byte2Byte << 12)
1527 + (String2String << 4) + T_String;
1528 // table[(T_byte<<4)+T_Object] = T_undefined ;
1529 table[(T_byte << 4) + T_double] = (Byte2Double << 12)
1530 + (Double2Double << 4) + T_double;
1531 table[(T_byte << 4) + T_float] = (Byte2Float << 12)
1532 + (Float2Float << 4) + T_float;
1533 // table[(T_byte<<4)+T_boolean] = T_undefined ;
1534 table[(T_byte << 4) + T_char] = (Byte2Int << 12) + (Char2Int << 4)
1536 table[(T_byte << 4) + T_int] = (Byte2Int << 12) + (Int2Int << 4)
1538 // table[(T_byte<<4)+T_null] = T_undefined ;
1540 // table[(T_long<<4)+T_undefined] = T_undefined ;
1541 table[(T_long << 4) + T_byte] = (Long2Long << 12) + (Byte2Long << 4)
1543 table[(T_long << 4) + T_long] = (Long2Long << 12) + (Long2Long << 4)
1545 table[(T_long << 4) + T_short] = (Long2Long << 12) + (Short2Long << 4)
1547 // table[(T_long<<4)+T_void] = T_undefined ;
1548 table[(T_long << 4) + T_String] = (Long2Long << 12)
1549 + (String2String << 4) + T_String;
1550 // table[(T_long<<4)+T_Object] = T_undefined ;
1551 table[(T_long << 4) + T_double] = (Long2Double << 12)
1552 + (Double2Double << 4) + T_double;
1553 table[(T_long << 4) + T_float] = (Long2Float << 12)
1554 + (Float2Float << 4) + T_float;
1555 // table[(T_long<<4)+T_boolean] = T_undefined ;
1556 table[(T_long << 4) + T_char] = (Long2Long << 12) + (Char2Long << 4)
1558 table[(T_long << 4) + T_int] = (Long2Long << 12) + (Int2Long << 4)
1561 // table[(T_long<<4)+T_null] = T_undefined ;
1563 // table[(T_short<<4)+T_undefined] = T_undefined ;
1564 table[(T_short << 4) + T_byte] = (Short2Int << 12) + (Byte2Int << 4)
1566 table[(T_short << 4) + T_long] = (Short2Long << 12) + (Long2Long << 4)
1568 table[(T_short << 4) + T_short] = (Short2Int << 12) + (Short2Int << 4)
1570 // table[(T_short<<4)+T_void] = T_undefined ;
1571 table[(T_short << 4) + T_String] = (Short2Short << 12)
1572 + (String2String << 4) + T_String;
1573 // table[(T_short<<4)+T_Object] = T_undefined ;
1574 table[(T_short << 4) + T_double] = (Short2Double << 12)
1575 + (Double2Double << 4) + T_double;
1576 table[(T_short << 4) + T_float] = (Short2Float << 12)
1577 + (Float2Float << 4) + T_float;
1578 // table[(T_short<<4)+T_boolean] = T_undefined ;
1579 table[(T_short << 4) + T_char] = (Short2Int << 12) + (Char2Int << 4)
1581 table[(T_short << 4) + T_int] = (Short2Int << 12) + (Int2Int << 4)
1583 // table[(T_short<<4)+T_null] = T_undefined ;
1585 // table[(T_void<<4)+T_undefined] = T_undefined ;
1586 // table[(T_void<<4)+T_byte] = T_undefined ;
1587 // table[(T_void<<4)+T_long] = T_undefined ;
1588 // table[(T_void<<4)+T_short] = T_undefined ;
1589 // table[(T_void<<4)+T_void] = T_undefined ;
1590 // table[(T_void<<4)+T_String] = T_undefined ;
1591 // table[(T_void<<4)+T_Object] = T_undefined ;
1592 // table[(T_void<<4)+T_double] = T_undefined ;
1593 // table[(T_void<<4)+T_float] = T_undefined ;
1594 // table[(T_void<<4)+T_boolean] = T_undefined ;
1595 // table[(T_void<<4)+T_char] = T_undefined ;
1596 // table[(T_void<<4)+T_int] = T_undefined ;
1597 // table[(T_void<<4)+T_null] = T_undefined ;
1599 // table[(T_String<<4)+T_undefined] = T_undefined ;
1600 table[(T_String << 4) + T_byte] = (String2String << 12)
1601 + (Byte2Byte << 4) + T_String;
1602 table[(T_String << 4) + T_long] = (String2String << 12)
1603 + (Long2Long << 4) + T_String;
1604 table[(T_String << 4) + T_short] = (String2String << 12)
1605 + (Short2Short << 4) + T_String;
1606 // table[(T_String<<4)+T_void] = T_undefined ;
1607 table[(T_String << 4) + T_String] = (String2String << 12)
1608 + (String2String << 4) + T_String;
1609 table[(T_String << 4) + T_Object] = (String2String << 12)
1610 + (Object2Object << 4) + T_String;
1611 table[(T_String << 4) + T_double] = (String2String << 12)
1612 + (Double2Double << 4) + T_String;
1613 table[(T_String << 4) + T_float] = (String2String << 12)
1614 + (Float2Float << 4) + T_String;
1615 table[(T_String << 4) + T_boolean] = (String2String << 12)
1616 + (Boolean2Boolean << 4) + T_String;
1617 table[(T_String << 4) + T_char] = (String2String << 12)
1618 + (Char2Char << 4) + T_String;
1619 table[(T_String << 4) + T_int] = (String2String << 12) + (Int2Int << 4)
1621 table[(T_String << 4) + T_null] = (String2String << 12) + (T_null << 8)
1622 + (T_null << 4) + T_String;
1624 // table[(T_Object<<4)+T_undefined] = T_undefined ;
1625 // table[(T_Object<<4)+T_byte] = T_undefined ;
1626 // table[(T_Object<<4)+T_long] = T_undefined ;
1627 // table[(T_Object<<4)+T_short] = T_undefined ;
1628 // table[(T_Object<<4)+T_void] = T_undefined ;
1629 table[(T_Object << 4) + T_String] = (Object2Object << 12)
1630 + (String2String << 4) + T_String;
1631 // table[(T_Object<<4)+T_Object] = T_undefined ;
1632 // table[(T_Object<<4)+T_double] = T_undefined ;
1633 // table[(T_Object<<4)+T_float] = T_undefined ;
1634 // table[(T_Object<<4)+T_boolean] = T_undefined ;
1635 // table[(T_Object<<4)+T_char] = T_undefined ;
1636 // table[(T_Object<<4)+T_int] = T_undefined ;
1637 // table[(T_Object<<4)+T_null] = T_undefined ;
1639 // table[(T_double<<4)+T_undefined] = T_undefined ;
1640 table[(T_double << 4) + T_byte] = (Double2Double << 12)
1641 + (Byte2Double << 4) + T_double;
1642 table[(T_double << 4) + T_long] = (Double2Double << 12)
1643 + (Long2Double << 4) + T_double;
1644 table[(T_double << 4) + T_short] = (Double2Double << 12)
1645 + (Short2Double << 4) + T_double;
1647 // table[(T_double<<4)+T_void] = T_undefined ;
1648 table[(T_double << 4) + T_String] = (Double2Double << 12)
1649 + (String2String << 4) + T_String;
1650 // table[(T_double<<4)+T_Object] = T_undefined ;
1651 table[(T_double << 4) + T_double] = (Double2Double << 12)
1652 + (Double2Double << 4) + T_double;
1653 table[(T_double << 4) + T_float] = (Double2Double << 12)
1654 + (Float2Double << 4) + T_double;
1656 // table[(T_double<<4)+T_boolean] = T_undefined ;
1657 table[(T_double << 4) + T_char] = (Double2Double << 12)
1658 + (Char2Double << 4) + T_double;
1660 table[(T_double << 4) + T_int] = (Double2Double << 12)
1661 + (Int2Double << 4) + T_double;
1663 // table[(T_double<<4)+T_null] = T_undefined ;
1665 // table[(T_float<<4)+T_undefined] = T_undefined ;
1666 table[(T_float << 4) + T_byte] = (Float2Float << 12)
1667 + (Byte2Float << 4) + T_float;
1668 table[(T_float << 4) + T_long] = (Float2Float << 12)
1669 + (Long2Float << 4) + T_float;
1670 table[(T_float << 4) + T_short] = (Float2Float << 12)
1671 + (Short2Float << 4) + T_float;
1672 // table[(T_float<<4)+T_void] = T_undefined ;
1673 table[(T_float << 4) + T_String] = (Float2Float << 12)
1674 + (String2String << 4) + T_String;
1675 // table[(T_float<<4)+T_Object] = T_undefined ;
1676 table[(T_float << 4) + T_double] = (Float2Double << 12)
1677 + (Double2Double << 4) + T_double;
1678 table[(T_float << 4) + T_float] = (Float2Float << 12)
1679 + (Float2Float << 4) + T_float;
1680 // table[(T_float<<4)+T_boolean] = T_undefined ;
1681 table[(T_float << 4) + T_char] = (Float2Float << 12)
1682 + (Char2Float << 4) + T_float;
1683 table[(T_float << 4) + T_int] = (Float2Float << 12) + (Int2Float << 4)
1685 // table[(T_float<<4)+T_null] = T_undefined ;
1687 // table[(T_boolean<<4)+T_undefined] = T_undefined ;
1688 // table[(T_boolean<<4)+T_byte] = T_undefined ;
1689 // table[(T_boolean<<4)+T_long] = T_undefined ;
1690 // table[(T_boolean<<4)+T_short] = T_undefined ;
1691 // table[(T_boolean<<4)+T_void] = T_undefined ;
1692 table[(T_boolean << 4) + T_String] = (Boolean2Boolean << 12)
1693 + (String2String << 4) + T_String;
1694 // table[(T_boolean<<4)+T_Object] = T_undefined ;
1695 // table[(T_boolean<<4)+T_double] = T_undefined ;
1696 // table[(T_boolean<<4)+T_float] = T_undefined ;
1697 // table[(T_boolean<<4)+T_boolean] = T_undefined ;
1698 // table[(T_boolean<<4)+T_char] = T_undefined ;
1699 // table[(T_boolean<<4)+T_int] = T_undefined ;
1700 // table[(T_boolean<<4)+T_null] = T_undefined ;
1702 // table[(T_char<<4)+T_undefined] = T_undefined ;
1703 table[(T_char << 4) + T_byte] = (Char2Int << 12) + (Byte2Int << 4)
1705 table[(T_char << 4) + T_long] = (Char2Long << 12) + (Long2Long << 4)
1707 table[(T_char << 4) + T_short] = (Char2Int << 12) + (Short2Int << 4)
1709 // table[(T_char<<4)+T_void] = T_undefined ;
1710 table[(T_char << 4) + T_String] = (Char2Char << 12)
1711 + (String2String << 4) + T_String;
1712 // table[(T_char<<4)+T_Object] = T_undefined ;
1713 table[(T_char << 4) + T_double] = (Char2Double << 12)
1714 + (Double2Double << 4) + T_double;
1715 table[(T_char << 4) + T_float] = (Char2Float << 12)
1716 + (Float2Float << 4) + T_float;
1717 // table[(T_char<<4)+T_boolean] = T_undefined ;
1718 table[(T_char << 4) + T_char] = (Char2Int << 12) + (Char2Int << 4)
1721 table[(T_char << 4) + T_int] = (Char2Int << 12) + (Int2Int << 4)
1723 // table[(T_char<<4)+T_null] = T_undefined ;
1725 // table[(T_int<<4)+T_undefined] = T_undefined ;
1726 table[(T_int << 4) + T_byte] = (Int2Int << 12) + (Byte2Int << 4)
1728 table[(T_int << 4) + T_long] = (Int2Long << 12) + (Long2Long << 4)
1730 table[(T_int << 4) + T_short] = (Int2Int << 12) + (Short2Int << 4)
1732 // table[(T_int<<4)+T_void] = T_undefined ;
1733 table[(T_int << 4) + T_String] = (Int2Int << 12) + (String2String << 4)
1735 // table[(T_int<<4)+T_Object] = T_undefined ;
1736 table[(T_int << 4) + T_double] = (Int2Double << 12)
1737 + (Double2Double << 4) + T_double;
1738 table[(T_int << 4) + T_float] = (Int2Float << 12) + (Float2Float << 4)
1740 // table[(T_int<<4)+T_boolean] = T_undefined ;
1741 table[(T_int << 4) + T_char] = (Int2Int << 12) + (Char2Int << 4)
1743 table[(T_int << 4) + T_int] = (Int2Int << 12) + (Int2Int << 4) + T_int;
1744 // table[(T_int<<4)+T_null] = T_undefined ;
1746 // table[(T_null<<4)+T_undefined] = T_undefined ;
1747 // table[(T_null<<4)+T_byte] = T_undefined ;
1748 // table[(T_null<<4)+T_long] = T_undefined ;
1749 // table[(T_null<<4)+T_short] = T_undefined ;
1750 // table[(T_null<<4)+T_void] = T_undefined ;
1751 table[(T_null << 4) + T_String] = (T_null << 16) + (T_null << 12)
1752 + (String2String << 4) + T_String;
1753 // table[(T_null<<4)+T_Object] = T_undefined ;
1754 // table[(T_null<<4)+T_double] = T_undefined ;
1755 // table[(T_null<<4)+T_float] = T_undefined ;
1756 // table[(T_null<<4)+T_boolean] = T_undefined ;
1757 // table[(T_null<<4)+T_char] = T_undefined ;
1758 // table[(T_null<<4)+T_int] = T_undefined ;
1759 // table[(T_null<<4)+T_null] =
1760 // (Null2String<<12)+(Null2String<<4)+T_String ;;
1765 public static final int[] get_REMAINDER() {
1767 // the code is an int
1768 // (cast) left Op (cast) rigth --> result
1769 // 0000 0000 0000 0000 0000
1770 // <<16 <<12 <<8 <<4
1772 // int[] table = new int[16*16] ;
1776 public static final int[] get_RIGHT_SHIFT() {
1778 // the code is an int
1779 // (cast) left Op (cast) rigth --> result
1780 // 0000 0000 0000 0000 0000
1781 // <<16 <<12 <<8 <<4
1783 // int[] table = new int[16*16] ;
1784 return get_LEFT_SHIFT();
1787 public static final int[] get_UNSIGNED_RIGHT_SHIFT() {
1789 // the code is an int
1790 // (cast) left Op (cast) rigth --> result
1791 // 0000 0000 0000 0000 0000
1792 // <<16 <<12 <<8 <<4
1794 // int[] table = new int[16*16] ;
1795 return get_LEFT_SHIFT();
1798 public static final int[] get_XOR() {
1800 // the code is an int
1801 // (cast) left Op (cast) rigth --> result
1802 // 0000 0000 0000 0000 0000
1803 // <<16 <<12 <<8 <<4
1805 // int[] table = new int[16*16] ;
1809 public String operatorToString() {
1810 switch ((bits & OperatorMASK) >> OperatorSHIFT) {
1812 return "=="; //$NON-NLS-1$
1814 return "<="; //$NON-NLS-1$
1816 return ">="; //$NON-NLS-1$
1818 return "!="; //$NON-NLS-1$
1820 return "<<"; //$NON-NLS-1$
1822 return ">>"; //$NON-NLS-1$
1823 case UNSIGNED_RIGHT_SHIFT:
1824 return ">>>"; //$NON-NLS-1$
1826 return "||"; //$NON-NLS-1$
1828 return "&&"; //$NON-NLS-1$
1830 return "+"; //$NON-NLS-1$
1832 return "-"; //$NON-NLS-1$
1834 return "!"; //$NON-NLS-1$
1836 return "%"; //$NON-NLS-1$
1838 return "^"; //$NON-NLS-1$
1840 return "&"; //$NON-NLS-1$
1842 return "*"; //$NON-NLS-1$
1844 return "|"; //$NON-NLS-1$
1846 return "~"; //$NON-NLS-1$
1848 return "/"; //$NON-NLS-1$
1850 return ">"; //$NON-NLS-1$
1852 return "<"; //$NON-NLS-1$
1854 return "?:"; //$NON-NLS-1$
1856 return "="; //$NON-NLS-1$
1859 return "unknown operator"; //$NON-NLS-1$
1862 public StringBuffer printExpression(int indent, StringBuffer output) {
1865 return printExpressionNoParenthesis(0, output).append(')');
1868 public abstract StringBuffer printExpressionNoParenthesis(int indent,
1869 StringBuffer output);
1871 public String toStringExpression() {
1873 // subclass redefine toStringExpressionNoParenthesis()
1874 return "(" + toStringExpressionNoParenthesis() + ")"; //$NON-NLS-2$ //$NON-NLS-1$
1877 public abstract String toStringExpressionNoParenthesis();