debase-ruby_core_source 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +2 -1
- data/Rakefile +3 -2
- data/lib/debase/ruby_core_source/ruby-2.2.1/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/list/list.h +635 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/constant.h +43 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/eval_intern.h +275 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/gc.h +107 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/id.h +210 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/insns.inc +107 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/insns_info.inc +752 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/internal.h +1185 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/iseq.h +158 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/known_errors.inc +746 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/method.h +144 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/node.h +544 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/node_name.inc +212 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/opt_sc.inc +734 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/optinsn.inc +83 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/optunifs.inc +124 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/parse.h +203 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/probes_helper.h +67 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/regenc.h +234 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/regint.h +972 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/regparse.h +363 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/ruby_atomic.h +170 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/symbol.h +87 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/thread_pthread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/timev.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/transcode_data.h +123 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/version.h +52 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm.inc +3353 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm_core.h +1161 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm_debug.h +37 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm_exec.h +182 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm_insnhelper.h +233 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vm_opts.h +56 -0
- data/lib/debase/ruby_core_source/ruby-2.2.1/vmtc.inc +105 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +45 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4f569f92e7491bda2fbabbc9a1097a9751e2c5
|
4
|
+
data.tar.gz: 26e3751bbc395a51bedba5d8abd94d741c1161fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71fa484b407bf1cd9ba3afdabf833e8f61b14a3f50d02ff5d39b6db27a16e181db0d45b679b3b663c6bb6c5197e1e5db45462c91c96de4f3e1556d310b57ebc
|
7
|
+
data.tar.gz: c05676b7e922696f63b098335906a1d82989c1beadc70766201ddbafbfe3995df46012e5beca1f213092458ff0c9471a3d0d67b4f050403d5e33152d5c3f0524
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
To add headers for a new release run "rake add_source" with VERSION and PATCHLEVEL provide.
|
2
|
+
e.g. "rake add_source VERSION=2.1.3 PATCHLEVEL=242"
|
data/Rakefile
CHANGED
@@ -6,15 +6,16 @@ require 'fileutils'
|
|
6
6
|
require 'bundler'
|
7
7
|
Bundler::GemHelper.install_tasks
|
8
8
|
|
9
|
-
desc 'Add ruby headers under lib for a given VERSION'
|
9
|
+
desc 'Add ruby headers under lib for a given VERSION and PATHCLEVEL'
|
10
10
|
task :add_source do
|
11
11
|
version = ENV['VERSION'] or abort "Need a $VERSION"
|
12
|
+
patchlevel = ENV['PATCHLEVEL'] or abort "Need a $PATCHLEVEL"
|
12
13
|
ruby_dir = "ruby-#{version}"
|
13
14
|
minor_version = version.split('.')[0..1].join('.')
|
14
15
|
uri_path = "http://ftp.ruby-lang.org/pub/ruby/#{minor_version}/#{ruby_dir}.tar.gz"
|
15
16
|
dest_dir = File.dirname(__FILE__) + "/lib/debase/ruby_core_source/#{ruby_dir}"
|
16
17
|
if ENV['PATCHLEVEL']
|
17
|
-
dest_dir = dest_dir + "-p" +
|
18
|
+
dest_dir = dest_dir + "-p" + patchlevel
|
18
19
|
end
|
19
20
|
|
20
21
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
addr2line.h -
|
4
|
+
|
5
|
+
$Author$
|
6
|
+
|
7
|
+
Copyright (C) 2010 Shinichiro Hamaji
|
8
|
+
|
9
|
+
**********************************************************************/
|
10
|
+
|
11
|
+
#ifndef RUBY_ADDR2LINE_H
|
12
|
+
#define RUBY_ADDR2LINE_H
|
13
|
+
|
14
|
+
#ifdef USE_ELF
|
15
|
+
|
16
|
+
void
|
17
|
+
rb_dump_backtrace_with_lines(int num_traces, void **traces);
|
18
|
+
|
19
|
+
#endif /* USE_ELF */
|
20
|
+
|
21
|
+
#endif /* RUBY_ADDR2LINE_H */
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
2
|
+
#ifndef CCAN_BUILD_ASSERT_H
|
3
|
+
#define CCAN_BUILD_ASSERT_H
|
4
|
+
|
5
|
+
/**
|
6
|
+
* BUILD_ASSERT - assert a build-time dependency.
|
7
|
+
* @cond: the compile-time condition which must be true.
|
8
|
+
*
|
9
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
10
|
+
* by the compiler. This can only be used within a function.
|
11
|
+
*
|
12
|
+
* Example:
|
13
|
+
* #include <stddef.h>
|
14
|
+
* ...
|
15
|
+
* static char *foo_to_char(struct foo *foo)
|
16
|
+
* {
|
17
|
+
* // This code needs string to be at start of foo.
|
18
|
+
* BUILD_ASSERT(offsetof(struct foo, string) == 0);
|
19
|
+
* return (char *)foo;
|
20
|
+
* }
|
21
|
+
*/
|
22
|
+
#define BUILD_ASSERT(cond) \
|
23
|
+
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
|
24
|
+
|
25
|
+
/**
|
26
|
+
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
|
27
|
+
* @cond: the compile-time condition which must be true.
|
28
|
+
*
|
29
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
30
|
+
* by the compiler. This can be used in an expression: its value is "0".
|
31
|
+
*
|
32
|
+
* Example:
|
33
|
+
* #define foo_to_char(foo) \
|
34
|
+
* ((char *)(foo) \
|
35
|
+
* + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
|
36
|
+
*/
|
37
|
+
#define BUILD_ASSERT_OR_ZERO(cond) \
|
38
|
+
(sizeof(char [1 - 2*!(cond)]) - 1)
|
39
|
+
|
40
|
+
#endif /* CCAN_BUILD_ASSERT_H */
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
2
|
+
#ifndef CCAN_CHECK_TYPE_H
|
3
|
+
#define CCAN_CHECK_TYPE_H
|
4
|
+
|
5
|
+
/**
|
6
|
+
* check_type - issue a warning or build failure if type is not correct.
|
7
|
+
* @expr: the expression whose type we should check (not evaluated).
|
8
|
+
* @type: the exact type we expect the expression to be.
|
9
|
+
*
|
10
|
+
* This macro is usually used within other macros to try to ensure that a macro
|
11
|
+
* argument is of the expected type. No type promotion of the expression is
|
12
|
+
* done: an unsigned int is not the same as an int!
|
13
|
+
*
|
14
|
+
* check_type() always evaluates to 0.
|
15
|
+
*
|
16
|
+
* If your compiler does not support typeof, then the best we can do is fail
|
17
|
+
* to compile if the sizes of the types are unequal (a less complete check).
|
18
|
+
*
|
19
|
+
* Example:
|
20
|
+
* // They should always pass a 64-bit value to _set_some_value!
|
21
|
+
* #define set_some_value(expr) \
|
22
|
+
* _set_some_value((check_type((expr), uint64_t), (expr)))
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
* check_types_match - issue a warning or build failure if types are not same.
|
27
|
+
* @expr1: the first expression (not evaluated).
|
28
|
+
* @expr2: the second expression (not evaluated).
|
29
|
+
*
|
30
|
+
* This macro is usually used within other macros to try to ensure that
|
31
|
+
* arguments are of identical types. No type promotion of the expressions is
|
32
|
+
* done: an unsigned int is not the same as an int!
|
33
|
+
*
|
34
|
+
* check_types_match() always evaluates to 0.
|
35
|
+
*
|
36
|
+
* If your compiler does not support typeof, then the best we can do is fail
|
37
|
+
* to compile if the sizes of the types are unequal (a less complete check).
|
38
|
+
*
|
39
|
+
* Example:
|
40
|
+
* // Do subtraction to get to enclosing type, but make sure that
|
41
|
+
* // pointer is of correct type for that member.
|
42
|
+
* #define container_of(mbr_ptr, encl_type, mbr) \
|
43
|
+
* (check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
|
44
|
+
* ((encl_type *) \
|
45
|
+
* ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
|
46
|
+
*/
|
47
|
+
#if HAVE_TYPEOF
|
48
|
+
#define check_type(expr, type) \
|
49
|
+
((typeof(expr) *)0 != (type *)0)
|
50
|
+
|
51
|
+
#define check_types_match(expr1, expr2) \
|
52
|
+
((typeof(expr1) *)0 != (typeof(expr2) *)0)
|
53
|
+
#else
|
54
|
+
#include "ccan/build_assert/build_assert.h"
|
55
|
+
/* Without typeof, we can only test the sizes. */
|
56
|
+
#define check_type(expr, type) \
|
57
|
+
BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
|
58
|
+
|
59
|
+
#define check_types_match(expr1, expr2) \
|
60
|
+
BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
|
61
|
+
#endif /* HAVE_TYPEOF */
|
62
|
+
|
63
|
+
#endif /* CCAN_CHECK_TYPE_H */
|
@@ -0,0 +1,142 @@
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
2
|
+
#ifndef CCAN_CONTAINER_OF_H
|
3
|
+
#define CCAN_CONTAINER_OF_H
|
4
|
+
#include "ccan/check_type/check_type.h"
|
5
|
+
|
6
|
+
/**
|
7
|
+
* container_of - get pointer to enclosing structure
|
8
|
+
* @member_ptr: pointer to the structure member
|
9
|
+
* @containing_type: the type this member is within
|
10
|
+
* @member: the name of this member within the structure.
|
11
|
+
*
|
12
|
+
* Given a pointer to a member of a structure, this macro does pointer
|
13
|
+
* subtraction to return the pointer to the enclosing type.
|
14
|
+
*
|
15
|
+
* Example:
|
16
|
+
* struct foo {
|
17
|
+
* int fielda, fieldb;
|
18
|
+
* // ...
|
19
|
+
* };
|
20
|
+
* struct info {
|
21
|
+
* int some_other_field;
|
22
|
+
* struct foo my_foo;
|
23
|
+
* };
|
24
|
+
*
|
25
|
+
* static struct info *foo_to_info(struct foo *foo)
|
26
|
+
* {
|
27
|
+
* return container_of(foo, struct info, my_foo);
|
28
|
+
* }
|
29
|
+
*/
|
30
|
+
#define container_of(member_ptr, containing_type, member) \
|
31
|
+
((containing_type *) \
|
32
|
+
((char *)(member_ptr) \
|
33
|
+
- container_off(containing_type, member)) \
|
34
|
+
+ check_types_match(*(member_ptr), ((containing_type *)0)->member))
|
35
|
+
|
36
|
+
|
37
|
+
/**
|
38
|
+
* container_of_or_null - get pointer to enclosing structure, or NULL
|
39
|
+
* @member_ptr: pointer to the structure member
|
40
|
+
* @containing_type: the type this member is within
|
41
|
+
* @member: the name of this member within the structure.
|
42
|
+
*
|
43
|
+
* Given a pointer to a member of a structure, this macro does pointer
|
44
|
+
* subtraction to return the pointer to the enclosing type, unless it
|
45
|
+
* is given NULL, in which case it also returns NULL.
|
46
|
+
*
|
47
|
+
* Example:
|
48
|
+
* struct foo {
|
49
|
+
* int fielda, fieldb;
|
50
|
+
* // ...
|
51
|
+
* };
|
52
|
+
* struct info {
|
53
|
+
* int some_other_field;
|
54
|
+
* struct foo my_foo;
|
55
|
+
* };
|
56
|
+
*
|
57
|
+
* static struct info *foo_to_info_allowing_null(struct foo *foo)
|
58
|
+
* {
|
59
|
+
* return container_of_or_null(foo, struct info, my_foo);
|
60
|
+
* }
|
61
|
+
*/
|
62
|
+
static inline char *container_of_or_null_(void *member_ptr, size_t offset)
|
63
|
+
{
|
64
|
+
return member_ptr ? (char *)member_ptr - offset : NULL;
|
65
|
+
}
|
66
|
+
#define container_of_or_null(member_ptr, containing_type, member) \
|
67
|
+
((containing_type *) \
|
68
|
+
container_of_or_null_(member_ptr, \
|
69
|
+
container_off(containing_type, member)) \
|
70
|
+
+ check_types_match(*(member_ptr), ((containing_type *)0)->member))
|
71
|
+
|
72
|
+
/**
|
73
|
+
* container_off - get offset to enclosing structure
|
74
|
+
* @containing_type: the type this member is within
|
75
|
+
* @member: the name of this member within the structure.
|
76
|
+
*
|
77
|
+
* Given a pointer to a member of a structure, this macro does
|
78
|
+
* typechecking and figures out the offset to the enclosing type.
|
79
|
+
*
|
80
|
+
* Example:
|
81
|
+
* struct foo {
|
82
|
+
* int fielda, fieldb;
|
83
|
+
* // ...
|
84
|
+
* };
|
85
|
+
* struct info {
|
86
|
+
* int some_other_field;
|
87
|
+
* struct foo my_foo;
|
88
|
+
* };
|
89
|
+
*
|
90
|
+
* static struct info *foo_to_info(struct foo *foo)
|
91
|
+
* {
|
92
|
+
* size_t off = container_off(struct info, my_foo);
|
93
|
+
* return (void *)((char *)foo - off);
|
94
|
+
* }
|
95
|
+
*/
|
96
|
+
#define container_off(containing_type, member) \
|
97
|
+
offsetof(containing_type, member)
|
98
|
+
|
99
|
+
/**
|
100
|
+
* container_of_var - get pointer to enclosing structure using a variable
|
101
|
+
* @member_ptr: pointer to the structure member
|
102
|
+
* @container_var: a pointer of same type as this member's container
|
103
|
+
* @member: the name of this member within the structure.
|
104
|
+
*
|
105
|
+
* Given a pointer to a member of a structure, this macro does pointer
|
106
|
+
* subtraction to return the pointer to the enclosing type.
|
107
|
+
*
|
108
|
+
* Example:
|
109
|
+
* static struct info *foo_to_i(struct foo *foo)
|
110
|
+
* {
|
111
|
+
* struct info *i = container_of_var(foo, i, my_foo);
|
112
|
+
* return i;
|
113
|
+
* }
|
114
|
+
*/
|
115
|
+
#if HAVE_TYPEOF
|
116
|
+
#define container_of_var(member_ptr, container_var, member) \
|
117
|
+
container_of(member_ptr, typeof(*container_var), member)
|
118
|
+
#else
|
119
|
+
#define container_of_var(member_ptr, container_var, member) \
|
120
|
+
((void *)((char *)(member_ptr) - \
|
121
|
+
container_off_var(container_var, member)))
|
122
|
+
#endif
|
123
|
+
|
124
|
+
/**
|
125
|
+
* container_off_var - get offset of a field in enclosing structure
|
126
|
+
* @container_var: a pointer to a container structure
|
127
|
+
* @member: the name of a member within the structure.
|
128
|
+
*
|
129
|
+
* Given (any) pointer to a structure and a its member name, this
|
130
|
+
* macro does pointer subtraction to return offset of member in a
|
131
|
+
* structure memory layout.
|
132
|
+
*
|
133
|
+
*/
|
134
|
+
#if HAVE_TYPEOF
|
135
|
+
#define container_off_var(var, member) \
|
136
|
+
container_off(typeof(*var), member)
|
137
|
+
#else
|
138
|
+
#define container_off_var(var, member) \
|
139
|
+
((const char *)&(var)->member - (const char *)(var))
|
140
|
+
#endif
|
141
|
+
|
142
|
+
#endif /* CCAN_CONTAINER_OF_H */
|