Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9fcd6adaf2f8
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a494386c0a5a
Choose a head ref
  • 15 commits
  • 38 files changed
  • 1 contributor

Commits on Apr 10, 2016

  1. Copy the full SHA
    ae68d31 View commit details
  2. Copy the full SHA
    a191620 View commit details
  3. Copy the full SHA
    b56a05d View commit details
  4. Copy the full SHA
    a5eba75 View commit details
  5. Copy the full SHA
    e0310e8 View commit details
  6. Copy the full SHA
    b3046e5 View commit details
  7. Copy the full SHA
    538b7a2 View commit details
  8. Copy the full SHA
    64e9945 View commit details
  9. Copy the full SHA
    93a163a View commit details
  10. Copy the full SHA
    c2bbfb0 View commit details
  11. Copy the full SHA
    32dd431 View commit details
  12. 2
    Copy the full SHA
    8ae215d View commit details
  13. Copy the full SHA
    59d95f3 View commit details
  14. Copy the full SHA
    5e5b79f View commit details
  15. Copy the full SHA
    a494386 View commit details
Showing with 438 additions and 290 deletions.
  1. +96 −0 lib/ruby/truffle/cext/ruby.h
  2. +93 −93 truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java
  3. +3 −3 truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
  4. +2 −1 truffle/src/main/java/org/jruby/truffle/core/bool/FalseClassNodes.java
  5. +4 −2 truffle/src/main/java/org/jruby/truffle/core/bool/TrueClassNodes.java
  6. +0 −1 truffle/src/main/java/org/jruby/truffle/core/cast/ArrayAttributeCastNode.java
  7. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/NameToJavaStringNode.java
  8. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/NameToSymbolOrStringNode.java
  9. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToAryNode.java
  10. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToFNode.java
  11. +2 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToIntNode.java
  12. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToPathNode.java
  13. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToProcNode.java
  14. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{coerce → cast}/ToStrNode.java
  15. +1 −1 truffle/src/main/java/org/jruby/truffle/core/{conversion → cast}/ToSymbolNode.java
  16. +2 −3 truffle/src/main/java/org/jruby/truffle/core/encoding/EncodingNodes.java
  17. +8 −6 truffle/src/main/java/org/jruby/truffle/core/exception/ExceptionLayout.java
  18. +36 −44 truffle/src/main/java/org/jruby/truffle/core/exception/ExceptionNodes.java
  19. +53 −0 truffle/src/main/java/org/jruby/truffle/core/exception/ExceptionOperations.java
  20. +0 −25 truffle/src/main/java/org/jruby/truffle/core/ffi/PointerGuards.java
  21. +2 −2 truffle/src/main/java/org/jruby/truffle/core/format/convert/ToDoubleWithCoercionNode.java
  22. +5 −5 truffle/src/main/java/org/jruby/truffle/core/kernel/KernelNodes.java
  23. +6 −6 truffle/src/main/java/org/jruby/truffle/core/module/ModuleNodes.java
  24. +6 −4 truffle/src/main/java/org/jruby/truffle/core/mutex/MutexLayout.java
  25. +25 −63 truffle/src/main/java/org/jruby/truffle/core/mutex/MutexNodes.java
  26. +61 −0 truffle/src/main/java/org/jruby/truffle/core/mutex/MutexOperations.java
  27. +2 −2 truffle/src/main/java/org/jruby/truffle/core/regexp/MatchDataNodes.java
  28. +2 −2 truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java
  29. +2 −2 truffle/src/main/java/org/jruby/truffle/core/rubinius/IOBufferPrimitiveNodes.java
  30. +0 −2 truffle/src/main/java/org/jruby/truffle/core/rubinius/PointerPrimitiveNodes.java
  31. +4 −4 truffle/src/main/java/org/jruby/truffle/core/string/StringNodes.java
  32. +2 −2 truffle/src/main/java/org/jruby/truffle/core/thread/ThreadNodes.java
  33. +5 −0 truffle/src/main/java/org/jruby/truffle/language/RubyGuards.java
  34. +2 −2 truffle/src/main/java/org/jruby/truffle/language/dispatch/UncachedDispatchNode.java
  35. +1 −1 truffle/src/main/java/org/jruby/truffle/language/parser/jruby/BodyTranslator.java
  36. +2 −2 truffle/src/main/java/org/jruby/truffle/platform/posix/TrufflePosixHandler.java
  37. +2 −2 truffle/src/main/java/org/jruby/truffle/stdlib/BigDecimalNodes.java
  38. +2 −2 truffle/src/main/java/org/jruby/truffle/stdlib/psych/PsychParserNodes.java
96 changes: 96 additions & 0 deletions lib/ruby/truffle/cext/ruby.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
* Eclipse Public License version 1.0
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/

#ifndef TRUFFLE_RUBY_H
#define TRUFFLE_RUBY_H

#if defined(__cplusplus)
extern "C" {
#endif

#include <stdlib.h>
#include <stdint.h>
#include <string.h>

#define xmalloc malloc
#define xfree free
#define ALLOC_N(type, n) malloc(sizeof(type) * n)

typedef void *ID;
typedef void *VALUE;

extern VALUE Qfalse;
extern VALUE Qtrue;
extern VALUE Qnil;

extern VALUE rb_cObject;
extern VALUE rb_cArray;
extern VALUE rb_cHash;

extern VALUE rb_eRuntimeError;

int NUM2INT(VALUE value);
unsigned int NUM2UINT(VALUE value);
long NUM2LONG(VALUE value);

int FIX2INT(VALUE value);
unsigned int FIX2UINT(VALUE value);
long FIX2LONG(VALUE value);

VALUE INT2NUM(int value);
VALUE INT2FIX(int value);
VALUE UINT2NUM(unsigned int value);

VALUE LONG2NUM(long value);
VALUE LONG2FIX(long value);

int FIXNUM_P(VALUE value);

char* RSTRING_PTR(VALUE string);
int RSTRING_LEN(VALUE string);
ID rb_intern(const char *string);
VALUE rb_intern_str(VALUE string);
void rb_str_cat(VALUE string, char *to_concat, long length);

int RARRAY_LEN(VALUE array);
VALUE* RARRAY_PTR(VALUE array);
VALUE rb_ary_new_capa(long capacity);
VALUE rb_ary_new2();
VALUE rb_ary_new();
void rb_ary_push(VALUE array, VALUE value);
void rb_ary_store(VALUE array, long index, VALUE value);
VALUE rb_ary_entry(VALUE array, long index);

VALUE rb_hash_aref(VALUE hash, VALUE key);
void rb_hash_aset(VALUE hash, VALUE key, VALUE value);

void rb_scan_args(int, VALUE*, char *, ...);

VALUE rb_funcall(VALUE object, ID, int, ...);

VALUE rb_iv_get(VALUE object, const char *name);
VALUE rb_iv_set(VALUE object, const char *name, VALUE value);

VALUE rb_const_get(VALUE object, ID name);

void rb_raise(VALUE exception, const char *format, ...);

VALUE rb_define_module(char *name);
VALUE rb_define_module_under(VALUE module, char *name);

void rb_define_method(VALUE module, char *name, void *function, int args);
void rb_define_private_method(VALUE module, char *name, void *function, int args);
int rb_define_module_function(VALUE module, char *name, void *function, int args);

#if defined(__cplusplus)
}
#endif

#endif
Loading