/src/kilim/Constants.java

http://github.com/kilim/kilim · Java · 77 lines · 58 code · 12 blank · 7 comment · 0 complexity · 58ff91b6ec347d8c5bf22aaee71c2d19 MD5 · raw file

  1. /* Copyright (c) 2006, Sriram Srinivasan
  2. *
  3. * You may distribute this software under the terms of the license
  4. * specified in the file "License"
  5. */
  6. package kilim;
  7. import org.objectweb.asm.Opcodes;
  8. public interface Constants extends Opcodes {
  9. String KILIM_VERSION = "1.0";
  10. int KILIM_ASM = ASM7;
  11. // Type descriptors
  12. String D_BOOLEAN = "Z";
  13. String D_BYTE = "B";
  14. String D_CHAR = "C";
  15. String D_DOUBLE = "D";
  16. String D_FLOAT = "F";
  17. String D_INT = "I";
  18. String D_LONG = "J";
  19. String D_SHORT = "S";
  20. String D_VOID = "V";
  21. String D_ARRAY_BOOLEAN = "[Z";
  22. String D_ARRAY_BYTE = "[B";
  23. String D_ARRAY_CHAR = "[C";
  24. String D_ARRAY_DOUBLE = "[D";
  25. String D_ARRAY_FLOAT = "[F";
  26. String D_ARRAY_SHORT = "[S";
  27. String D_ARRAY_INT = "[I";
  28. String D_ARRAY_LONG = "[J";
  29. String D_NULL = "NULL";
  30. String D_RETURN_ADDRESS = "A";
  31. String D_OBJECT = "Ljava/lang/Object;";
  32. String D_STRING = "Ljava/lang/String;";
  33. String D_THROWABLE = "Ljava/lang/Throwable;";
  34. String D_UNDEFINED = "UNDEFINED";
  35. String D_FIBER = "Lkilim/Fiber;";
  36. String D_STATE = "Lkilim/State;";
  37. String D_TASK = "Lkilim/Task;";
  38. String D_PAUSABLE = "Lkilim/Pausable;";
  39. String D_FIBER_LAST_ARG = D_FIBER + ')'; // Last argument in a method descriptor
  40. String THROWABLE_CLASS = "java/lang/Throwable";
  41. String FIBER_CLASS = "kilim/Fiber";
  42. String STATE_CLASS = "kilim/State";
  43. String TASK_CLASS = "kilim/Task";
  44. String PAUSABLE_CLASS = "kilim/Pausable";
  45. String NOT_PAUSABLE_CLASS = "kilim/NotPausable";
  46. String WOVEN_FIELD = "$isWoven";
  47. // Constant opcodes missing from asm's opcodes (as of asm 3.0)
  48. int ILOAD_0 = 26;
  49. int LLOAD_0 = 30;
  50. int FLOAD_0 = 34;
  51. int DLOAD_0 = 38;
  52. int ALOAD_0 = 42;
  53. int ISTORE_0 = 59;
  54. int LSTORE_0 = 63;
  55. int FSTORE_0 = 67;
  56. int DSTORE_0 = 71;
  57. int ASTORE_0 = 75;
  58. int LDC2_W = 20;
  59. String SAM_SHIM_PREFIX = "$shim$";
  60. public static class Util {
  61. public static boolean isSamShim(String name) {
  62. return name.startsWith(SAM_SHIM_PREFIX);
  63. }
  64. }
  65. }