equal
deleted
inserted
replaced
43 } |
43 } |
44 } |
44 } |
45 |
45 |
46 protected def store[A](x: A): A = |
46 protected def store[A](x: A): A = |
47 { |
47 { |
48 if (table == null) x |
48 if (table == null || x == null) x |
49 else { |
49 else { |
50 table.put(x, new WeakReference[Any](x)) |
50 table.put(x, new WeakReference[Any](x)) |
51 x |
51 x |
52 } |
52 } |
53 } |
53 } |
54 |
54 |
55 protected def cache_string(x: String): String = |
55 protected def cache_string(x: String): String = |
56 { |
56 { |
57 if (x == "") "" |
57 if (x == null) null |
|
58 else if (x == "") "" |
58 else if (x == "true") "true" |
59 else if (x == "true") "true" |
59 else if (x == "false") "false" |
60 else if (x == "false") "false" |
60 else if (x == "0.0") "0.0" |
61 else if (x == "0.0") "0.0" |
61 else if (Library.is_small_int(x)) Library.signed_string_of_int(Integer.parseInt(x)) |
62 else if (Library.is_small_int(x)) Library.signed_string_of_int(Integer.parseInt(x)) |
62 else { |
63 else { |