jrjackson 0.3.9-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.__jrubyrc +433 -0
  3. data/.gitignore +10 -0
  4. data/.mvn/extensions.xml +8 -0
  5. data/Gemfile +10 -0
  6. data/Mavenfile +32 -0
  7. data/README.md +150 -0
  8. data/Rakefile +10 -0
  9. data/alt_bench.rb +46 -0
  10. data/changelog.md +131 -0
  11. data/jrjackson.gemspec +32 -0
  12. data/lib/com/fasterxml/jackson/core/jackson-annotations/2.7.1/jackson-annotations-2.7.1.jar +0 -0
  13. data/lib/com/fasterxml/jackson/core/jackson-core/2.7.1/jackson-core-2.7.1.jar +0 -0
  14. data/lib/com/fasterxml/jackson/core/jackson-databind/2.7.1/jackson-databind-2.7.1.jar +0 -0
  15. data/lib/com/fasterxml/jackson/module/jackson-module-afterburner/2.6.3/jackson-module-afterburner-2.6.3.jar +0 -0
  16. data/lib/com/fasterxml/jackson/module/jackson-module-afterburner/2.7.1/jackson-module-afterburner-2.7.1.jar +0 -0
  17. data/lib/jrjackson.rb +2 -0
  18. data/lib/jrjackson/build_info.rb +15 -0
  19. data/lib/jrjackson/jars/jrjackson-1.2.18.jar +0 -0
  20. data/lib/jrjackson/jars/jrjackson-1.2.7.jar +0 -0
  21. data/lib/jrjackson/jrjackson.rb +94 -0
  22. data/lib/jrjackson_jars.rb +7 -0
  23. data/lib/require_relative_patch.rb +6 -0
  24. data/pom.xml +193 -0
  25. data/profiling/profiled.rb +15 -0
  26. data/run_all_individual_bench.sh +25 -0
  27. data/run_jruby_individual_bench.sh +20 -0
  28. data/run_mri_individual_bench.sh +7 -0
  29. data/src/main/java/com/jrjackson/IParseHandler.java +53 -0
  30. data/src/main/java/com/jrjackson/JavaBigDecimalValueConverter.java +17 -0
  31. data/src/main/java/com/jrjackson/JavaBigIntValueConverter.java +17 -0
  32. data/src/main/java/com/jrjackson/JavaConverter.java +10 -0
  33. data/src/main/java/com/jrjackson/JavaFloatValueConverter.java +16 -0
  34. data/src/main/java/com/jrjackson/JavaHandler.java +118 -0
  35. data/src/main/java/com/jrjackson/JavaLongValueConverter.java +16 -0
  36. data/src/main/java/com/jrjackson/JjParse.java +147 -0
  37. data/src/main/java/com/jrjackson/JrJacksonBase.java +152 -0
  38. data/src/main/java/com/jrjackson/JrJacksonJava.java +81 -0
  39. data/src/main/java/com/jrjackson/JrJacksonRaw.java +108 -0
  40. data/src/main/java/com/jrjackson/JrJacksonRuby.java +89 -0
  41. data/src/main/java/com/jrjackson/JrJacksonSaj.java +26 -0
  42. data/src/main/java/com/jrjackson/JrJacksonSch.java +25 -0
  43. data/src/main/java/com/jrjackson/JrJacksonService.java +38 -0
  44. data/src/main/java/com/jrjackson/JrParse.java +149 -0
  45. data/src/main/java/com/jrjackson/ParseError.java +16 -0
  46. data/src/main/java/com/jrjackson/RubyAnySerializer.java +254 -0
  47. data/src/main/java/com/jrjackson/RubyBigDecimalValueConverter.java +18 -0
  48. data/src/main/java/com/jrjackson/RubyBigIntValueConverter.java +21 -0
  49. data/src/main/java/com/jrjackson/RubyConverter.java +12 -0
  50. data/src/main/java/com/jrjackson/RubyDateFormat.java +34 -0
  51. data/src/main/java/com/jrjackson/RubyFloatValueConverter.java +18 -0
  52. data/src/main/java/com/jrjackson/RubyHandler.java +119 -0
  53. data/src/main/java/com/jrjackson/RubyIntValueConverter.java +18 -0
  54. data/src/main/java/com/jrjackson/RubyJacksonModule.java +72 -0
  55. data/src/main/java/com/jrjackson/RubyKeyConverter.java +12 -0
  56. data/src/main/java/com/jrjackson/RubyNameConverter.java +9 -0
  57. data/src/main/java/com/jrjackson/RubyObjectDeserializer.java +182 -0
  58. data/src/main/java/com/jrjackson/RubyStringConverter.java +18 -0
  59. data/src/main/java/com/jrjackson/RubyStringKeyConverter.java +15 -0
  60. data/src/main/java/com/jrjackson/RubyStringNameConverter.java +12 -0
  61. data/src/main/java/com/jrjackson/RubySymbolKeyConverter.java +15 -0
  62. data/src/main/java/com/jrjackson/RubySymbolNameConverter.java +12 -0
  63. data/src/main/java/com/jrjackson/RubyUtils.java +150 -0
  64. data/src/main/java/com/jrjackson/SajParse.java +169 -0
  65. data/src/main/java/com/jrjackson/SchParse.java +209 -0
  66. data/src/main/java/com/jrjackson/StreamParse.java +66 -0
  67. data/test/jrjackson_test.rb +533 -0
  68. metadata +162 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d0880b3aefaaf4c13cbde88c6501ba2a297db4e9
4
+ data.tar.gz: e168dcc7bf1990f23925263ff5d7893874e99e2d
5
+ SHA512:
6
+ metadata.gz: db9ea37b82fa3059c262e60d20b527d2de151b3394422142122901006ed30b25dd026ffb1898708ce5acda688d2b2ea8ee1454d65ecb4239e19e105fd264b4a1
7
+ data.tar.gz: 1d932c32c8997bbf62b6325ba89530cfd10417434e17a330883f5574879758420e9570f13c3682df3f20884ed2f1513ad35761900fc25d27987e8d832d5753be
@@ -0,0 +1,433 @@
1
+ ################################################################################
2
+ # compiler settings
3
+ ################################################################################
4
+
5
+ # Set compilation mode. JIT = at runtime; FORCE = before execution.
6
+ # Options: [JIT, FORCE, OFF, OFFIR], Default: JIT.
7
+ # compile.mode=JIT
8
+ compile.mode=FORCE
9
+
10
+ # Dump to console all bytecode generated at runtime.
11
+ # Options: [true, false], Default: false.
12
+ compile.dump=false
13
+
14
+ # (EXPERIMENTAL) Turn on compilation without polling for "unsafe" thread events.
15
+ # Options: [true, false], Default: false.
16
+ compile.threadless=false
17
+
18
+ # Turn on fast operators for Fixnum and Float.
19
+ # Options: [true, false], Default: true.
20
+ compile.fastops=true
21
+
22
+ # Set the number of lines at which compiled bodies are "chained".
23
+ # Options: [Integer], Default: 500.
24
+ compile.chainsize=500
25
+
26
+ # Generate method bindings (handles) for compiled methods lazily.
27
+ # Options: [true, false], Default: false.
28
+ compile.lazyHandles=false
29
+
30
+ # Enable or disable peephole optimizations.
31
+ # Options: [true, false], Default: true.
32
+ compile.peephole=true
33
+
34
+ # Compile calls without guards, for experimentation.
35
+ # Options: [true, false], Default: false.
36
+ compile.noguards=false
37
+
38
+ # Compile with all "mostly harmless" compiler optimizations.
39
+ # Options: [true, false], Default: false.
40
+ compile.fastest=true
41
+
42
+ # Compile obj.__send__(<literal>, ...) as obj.<literal>(...).
43
+ # Options: [true, false], Default: false.
44
+ compile.fastsend=false
45
+
46
+ # Return true from multiple assignment instead of a new array.
47
+ # Options: [true, false], Default: false.
48
+ compile.fastMasgn=false
49
+
50
+ # Use invokedynamic for optimizing Ruby code
51
+ # Options: [true, false], Default: false.
52
+ # compile.invokedynamic=false
53
+ compile.invokedynamic=true
54
+
55
+
56
+ ################################################################################
57
+ # invokedynamic settings
58
+ ################################################################################
59
+
60
+ # Maximum call site failures after which to inline cache.
61
+ # Options: [Integer], Default: 1000.
62
+ invokedynamic.maxfail=1000
63
+
64
+ # Maximum polymorphism of PIC binding.
65
+ # Options: [Integer], Default: 2.
66
+ invokedynamic.maxpoly=2
67
+
68
+ # Log binding of invokedynamic call sites.
69
+ # Options: [true, false], Default: false.
70
+ invokedynamic.log.binding=false
71
+
72
+ # Log invokedynamic-based constant lookups.
73
+ # Options: [true, false], Default: false.
74
+ invokedynamic.log.constants=false
75
+
76
+ # Enable all possible uses of invokedynamic.
77
+ # Options: [true, false], Default: false.
78
+ invokedynamic.all=true
79
+
80
+ # Enable all safe (but maybe not fast) uses of invokedynamic.
81
+ # Options: [true, false], Default: false.
82
+ invokedynamic.safe=false
83
+
84
+ # Enable invokedynamic for method invocations.
85
+ # Options: [true, false], Default: true.
86
+ invokedynamic.invocation=true
87
+
88
+ # Use SwitchPoint for class modification guards on invocations.
89
+ # Options: [true, false], Default: true.
90
+ # invokedynamic.invocation.switchpoint=true
91
+
92
+ # Also bind indirect method invokers to invokedynamic.
93
+ # Options: [true, false], Default: true.
94
+ invokedynamic.invocation.indirect=true
95
+
96
+ # Bind Ruby to Java invocations with invokedynamic.
97
+ # Options: [true, false], Default: true.
98
+ invokedynamic.invocation.java=true
99
+
100
+ # Bind Ruby attribue invocations directly to invokedynamic.
101
+ # Options: [true, false], Default: true.
102
+ invokedynamic.invocation.attr=true
103
+
104
+ # Bind Fixnum and Float math using optimized logic.
105
+ # Options: [true, false], Default: true.
106
+ invokedynamic.invocation.fastops=true
107
+
108
+ # Use invokedynamic to load cached values like literals and constants.
109
+ # Options: [true, false], Default: true.
110
+ invokedynamic.cache=true
111
+
112
+ # Use invokedynamic to load constants.
113
+ # Options: [true, false], Default: true.
114
+ invokedynamic.cache.constants=true
115
+
116
+ # Use invokedynamic to load literals.
117
+ # Options: [true, false], Default: true.
118
+ invokedynamic.cache.literals=true
119
+
120
+ # Use invokedynamic to get/set instance variables.
121
+ # Options: [true, false], Default: true.
122
+ invokedynamic.cache.ivars=true
123
+
124
+ # Use ClassValue to store class-specific data.
125
+ # Options: [true, false], Default: false.
126
+ invokedynamic.class.values=false
127
+
128
+ # ################################################################################
129
+ # # jit settings
130
+ # ################################################################################
131
+
132
+ # # Set the JIT threshold to the specified method invocation count.
133
+ # # Options: [Integer], Default: 50.
134
+ jit.threshold=1
135
+
136
+ # # Set the max count of active methods eligible for JIT-compilation.
137
+ # # Options: [Integer], Default: 4096.
138
+ jit.max=16384
139
+
140
+ # # Set the maximum full-class byte size allowed for jitted methods.
141
+ # # Options: [Integer], Default: 30000.
142
+ # jit.maxsize=30000
143
+
144
+ # # Enable JIT logging (reports successful compilation).
145
+ # # Options: [true, false], Default: false.
146
+ # jit.logging=false
147
+
148
+ # # Enable verbose JIT logging (reports failed compilation).
149
+ # # Options: [true, false], Default: false.
150
+ # jit.logging.verbose=false
151
+
152
+ # # Enable stdout dumping of JITed bytecode.
153
+ # # Options: [true, false], Default: false.
154
+ # jit.dumping=false
155
+
156
+ # # Log a message every n methods JIT compiled.
157
+ # # Options: [Integer], Default: 0.
158
+ # jit.logEvery=0
159
+
160
+ # # Exclude methods from JIT. Comma delimited.
161
+ # # Options: [ClsOrMod, ClsOrMod::method_name, -::method_name], Default: none.
162
+ # jit.exclude=none
163
+
164
+ # # Cache jitted method in-memory bodies across runtimes and loads.
165
+ # # Options: [true, false], Default: true.
166
+ # jit.cache=true
167
+
168
+ # # Save jitted methods to <dir> as they're compiled, for future runs.
169
+ # # Options: [dir], Default: null.
170
+ # jit.codeCache=null
171
+
172
+ # # Log loading of JITed bytecode.
173
+ # # Options: [true, false], Default: false.
174
+ # jit.debug=false
175
+
176
+ # # Run the JIT compiler in a background thread.
177
+ # # Options: [true, false], Default: true.
178
+ # jit.background=true
179
+
180
+
181
+ # ################################################################################
182
+ # # intermediate representation settings
183
+ # ################################################################################
184
+
185
+ # # Debug generation of JRuby IR.
186
+ # # Options: [true, false], Default: false.
187
+ # ir.debug=false
188
+
189
+ # # [EXPT]: Profile IR code during interpretation.
190
+ # # Options: [true, false], Default: false.
191
+ # ir.profile=false
192
+
193
+ # # Debug compilation of JRuby IR.
194
+ # # Options: [true, false], Default: false.
195
+ # ir.compiler.debug=false
196
+
197
+ # # Specify comma delimeted list of passes to run.
198
+ # # Options: [String], Default: null.
199
+ # ir.passes=null
200
+
201
+ # # Specify comma delimeted list of passes to run after inlining a method.
202
+ # # Options: [String], Default: null.
203
+ # ir.inline_passes=null
204
+
205
+
206
+ # ################################################################################
207
+ # # native settings
208
+ # ################################################################################
209
+
210
+ # # Enable/disable native code, including POSIX features and C exts.
211
+ # # Options: [true, false], Default: true.
212
+ # native.enabled=true
213
+
214
+ # # Enable verbose logging of native extension loading.
215
+ # # Options: [true, false], Default: false.
216
+ # native.verbose=false
217
+
218
+ # # Enable or disable C extension support.
219
+ # # Options: [true, false], Default: false.
220
+ # cext.enabled=false
221
+
222
+ # # Dump bytecode-generated FFI stubs to console.
223
+ # # Options: [true, false], Default: false.
224
+ # ffi.compile.dump=false
225
+
226
+ # # Number of FFI invocations before generating a bytecode stub.
227
+ # # Options: [Integer], Default: 100.
228
+ # ffi.compile.threshold=100
229
+
230
+ # # Use invokedynamic to bind FFI invocations.
231
+ # # Options: [true, false], Default: false.
232
+ # ffi.compile.invokedynamic=false
233
+
234
+
235
+ # ################################################################################
236
+ # # thread pooling settings
237
+ # ################################################################################
238
+
239
+ # # Enable reuse of native threads via a thread pool.
240
+ # # Options: [true, false], Default: false.
241
+ # thread.pool.enabled=false
242
+
243
+ # # The minimum number of threads to keep alive in the pool.
244
+ # # Options: [Integer], Default: 0.
245
+ # thread.pool.min=0
246
+
247
+ # # The maximum number of threads to allow in the pool.
248
+ # # Options: [Integer], Default: 2147483647.
249
+ # thread.pool.max=2147483647
250
+
251
+ # # The maximum number of seconds to keep alive an idle thread.
252
+ # # Options: [Integer], Default: 60.
253
+ # thread.pool.ttl=60
254
+
255
+
256
+ ################################################################################
257
+ # miscellaneous settings
258
+ ################################################################################
259
+
260
+ # Specify the major Ruby version to be compatible with.
261
+ # Options: [1.8, 1.9, 2.0], Default: 1.9.
262
+ compat.version=2.0
263
+
264
+ # Enable or disable ObjectSpace.each_object.
265
+ # Options: [true, false], Default: false.
266
+ objectspace.enabled=false
267
+
268
+ # Enable or disable SipHash for String hash function.
269
+ # Options: [true, false], Default: false.
270
+ siphash.enabled=false
271
+
272
+ # Set in-process launching of e.g. system('ruby ...').
273
+ # Options: [true, false], Default: false.
274
+ launch.inproc=false
275
+
276
+ # Specify the major Java bytecode version.
277
+ # Options: [1.5, 1.6, 1.7], Default: 1.7.
278
+ bytecode.version=1.7
279
+
280
+ # Set whether JMX management is enabled.
281
+ # Options: [true, false], Default: false.
282
+ management.enabled=false
283
+
284
+ # Make non-local flow jumps generate backtraces.
285
+ # Options: [true, false], Default: false.
286
+ jump.backtrace=false
287
+
288
+ # Do not unwrap process streams (issue on some recent JVMs).
289
+ # Options: [true, false], Default: false.
290
+ process.noUnwrap=false
291
+
292
+ # Before instantiation, stand up a real Java class for ever Ruby class.
293
+ # Options: [true, false], Default: false.
294
+ reify.classes=false
295
+
296
+ # Log errors during reification (reify.classes=true).
297
+ # Options: [true, false], Default: false.
298
+ reify.logErrors=false
299
+
300
+ # Use reflection for binding methods, not generated bytecode.
301
+ # Options: [true, false], Default: false.
302
+ reflected.handles=false
303
+
304
+ # Enable colorized backtraces.
305
+ # Options: [true, false], Default: false.
306
+ backtrace.color=false
307
+
308
+ # Set the style of exception backtraces.
309
+ # Options: [normal, raw, full, mri], Default: normal.
310
+ backtrace.style=normal
311
+
312
+ # Mask .java lines in Ruby backtraces.
313
+ # Options: [true, false], Default: false.
314
+ backtrace.mask=false
315
+
316
+ # Set the signal used for dumping thread stacks.
317
+ # Options: [USR1, USR2, etc], Default: USR2.
318
+ thread.dump.signal=USR2
319
+
320
+ # Use native impls for parts of net/protocol.
321
+ # Options: [true, false], Default: false.
322
+ native.net.protocol=false
323
+
324
+ # Use JVM coroutines for Fiber.
325
+ # Options: [true, false], Default: false.
326
+ fiber.coroutines=false
327
+
328
+ # Use a single global lock for requires.
329
+ # Options: [true, false], Default: false.
330
+ global.require.lock=false
331
+
332
+ # Do a true process-obliterating native exec for Kernel#exec.
333
+ # Options: [true, false], Default: true.
334
+ native.exec=true
335
+
336
+
337
+ # ################################################################################
338
+ # # debugging and logging settings
339
+ # ################################################################################
340
+
341
+ # # Log require/load file searches.
342
+ # # Options: [true, false], Default: false.
343
+ # debug.loadService=false
344
+
345
+ # # Log require/load parse+evaluate times.
346
+ # # Options: [true, false], Default: false.
347
+ # debug.loadService.timing=false
348
+
349
+ # # Log externally-launched processes.
350
+ # # Options: [true, false], Default: false.
351
+ # debug.launch=false
352
+
353
+ # # Set whether full traces are enabled (c-call/c-return).
354
+ # # Options: [true, false], Default: false.
355
+ # debug.fullTrace=false
356
+
357
+ # # Print which script is executed by '-S' flag.
358
+ # # Options: [true, false], Default: false.
359
+ # debug.scriptResolution=false
360
+
361
+ # # disables JRuby impl script loads and prints parse exceptions
362
+ # # Options: [true, false], Default: false.
363
+ # debug.parser=false
364
+
365
+ # # Generate backtraces for heavily-used Errno exceptions (EAGAIN).
366
+ # # Options: [true, false], Default: false.
367
+ # errno.backtrace=false
368
+
369
+ # # Log every time an exception is constructed.
370
+ # # Options: [true, false], Default: false.
371
+ # log.exceptions=false
372
+
373
+ # # Log every time an exception backtrace is generated.
374
+ # # Options: [true, false], Default: false.
375
+ # log.backtraces=false
376
+
377
+ # # Log every time a Kernel#caller backtrace is generated.
378
+ # # Options: [true, false], Default: false.
379
+ # log.callers=false
380
+
381
+ # # Log every time a built-in warning backtrace is generated.
382
+ # # Options: [true, false], Default: false.
383
+ # log.warnings=false
384
+
385
+ # # Use specified class for logging.
386
+ # # Options: [class name], Default: org.jruby.util.log.JavaUtilLoggingLogger.
387
+ # logger.class=org.jruby.util.log.JavaUtilLoggingLogger
388
+
389
+
390
+ # ################################################################################
391
+ # # java integration settings
392
+ # ################################################################################
393
+
394
+ # # Try to set inaccessible Java methods to be accessible.
395
+ # # Options: [true, false], Default: true.
396
+ # ji.setAccessible=true
397
+
398
+ # # Log whether setAccessible is working.
399
+ # # Options: [true, false], Default: false.
400
+ # ji.logCanSetAccessible=false
401
+
402
+ # # Allow Capitalized Java pacakge names.
403
+ # # Options: [true, false], Default: false.
404
+ # ji.upper.case.package.name.allowed=false
405
+
406
+ # # Use java.lang.reflect.Proxy for interface impl.
407
+ # # Options: [true, false], Default: false.
408
+ # interfaces.useProxy=false
409
+
410
+ # # Use generated handles instead of reflection for calling Java.
411
+ # # Options: [true, false], Default: false.
412
+ # java.handles=false
413
+
414
+ # # Extend Java classes without using a proxy object.
415
+ # # Options: [true, false], Default: false.
416
+ # ji.newStyleExtension=false
417
+
418
+ # # Cache Java object wrappers between calls.
419
+ # # Options: [true, false], Default: true.
420
+ # ji.objectProxyCache=true
421
+
422
+ # # Allow external envs to replace JI proxy class factory
423
+ # # Options: [String], Default: null.
424
+ # ji.proxyClassFactory=null
425
+
426
+
427
+ # ################################################################################
428
+ # # profiling settings
429
+ # ################################################################################
430
+
431
+ # # Maximum number of methods to consider for profiling.
432
+ # # Options: [Integer], Default: 100000.
433
+ # profile.max.methods=100000
@@ -0,0 +1,10 @@
1
+ Gemfile.lock
2
+ pkg
3
+ target
4
+ Rakefile.old
5
+ .idea
6
+ *.iml
7
+
8
+ linked
9
+ /libyjpagent.so
10
+ /.project