rb-threadframe 0.34 → 0.35

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS CHANGED
@@ -1,3 +1,10 @@
1
+ December 25, 2010 (0.35)
2
+ - 1.9.2 patches:
3
+ * Add new compile-option flags: save_tree_node and save_compile_opts
4
+ * Start saving parse tree node. (More cases need to be done.)
5
+
6
+ - Remove some Ruby warning messages
7
+
1
8
  December 10, 2010 (0.34) Giant Madagascar Day Release
2
9
 
3
10
  - 1.9.2 patches:
data/ext/iseq_extra.c CHANGED
@@ -52,6 +52,8 @@ iseq_compile_options(VALUE iseqval)
52
52
  COMPILE_OPTS_BOOL_SET_HASH(stack_caching);
53
53
  COMPILE_OPTS_BOOL_SET_HASH(trace_instruction);
54
54
  COMPILE_OPTS_BOOL_SET_HASH(debug_level);
55
+ COMPILE_OPTS_BOOL_SET_HASH(save_tree_node);
56
+ COMPILE_OPTS_BOOL_SET_HASH(save_compile_opts);
55
57
  return hash_opts;
56
58
  }
57
59
  }
data/ext/thread_frame.c CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  /* What release we got? */
9
- #define THREADFRAME_VERSION "0.34"
9
+ #define THREADFRAME_VERSION "0.35"
10
10
 
11
11
  #include <string.h>
12
12
  #include "../include/vm_core_mini.h" /* Pulls in ruby.h and node.h */
@@ -83,6 +83,8 @@ typedef struct rb_compile_option_struct {
83
83
  int stack_caching;
84
84
  int trace_instruction;
85
85
  int debug_level;
86
+ int save_tree_node;
87
+ int save_compile_opts;
86
88
  } rb_compile_option_t;
87
89
 
88
90
  /* Instruction sequence */
@@ -184,6 +186,16 @@ typedef struct rb_iseq_struct {
184
186
  struct iseq_compile_data *compile_data;
185
187
  /* Used to set a breakpoint at a VM instruction */
186
188
  unsigned char *breakpoints;
189
+
190
+ /* If this instruction sequence came from eval, the string of the
191
+ source as a String. */
192
+ VALUE source;
193
+
194
+ /* If we are saving tree nodes (a compile option), then tree_node
195
+ is the internal parse tree node representation for this
196
+ instruction sequence.
197
+ */
198
+ NODE *tree_node;
187
199
  } rb_iseq_t;
188
200
 
189
201
  enum ruby_special_exceptions {
data/lib/iseq_extra.rb CHANGED
@@ -88,20 +88,17 @@ class RubyVM::InstructionSequence
88
88
  def locate_line_with_children(line)
89
89
  iseq = self
90
90
  offset = iseq.locate_line(line)
91
- p ['++++1', offset, iseq]
92
91
  return iseq, offset if offset
93
92
 
94
93
  # Didn't find line in this iseq, so check if a contained
95
94
  # InstructionSequence encompasses the line searched for
96
95
  until offset
97
- child_iseq = iseq
96
+ current_iseq = iseq
98
97
  iseq = iseq.parent
99
98
  unless iseq
100
- # child_iseq is the top-most scope. Search down from here.
101
- top_iseq = child_iseq
99
+ # current_iseq is the top-most scope. Search down from here.
102
100
  top_iseq.child_iseqs.each do |child_iseq|
103
- p ['++++2', offset, child_iseq, child_iseq.parent]
104
- next if child_iseq.equal? top_iseq
101
+ next if child_iseq.equal? current_iseq
105
102
  if res = child_iseq.locate_line_with_children(line)
106
103
  return res
107
104
  end
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 34
8
- version: "0.34"
7
+ - 35
8
+ version: "0.35"
9
9
  platform: ruby
10
10
  authors:
11
11
  - R. Bernstein
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2010-12-10 00:00:00 -05:00
16
+ date: 2010-12-25 00:00:00 -05:00
17
17
  default_executable:
18
18
  dependencies: []
19
19
 
@@ -80,7 +80,7 @@ rdoc_options:
80
80
  - --main
81
81
  - README.md
82
82
  - --title
83
- - ThreadFrame 0.34 Documentation
83
+ - ThreadFrame 0.35 Documentation
84
84
  require_paths:
85
85
  - lib
86
86
  required_ruby_version: !ruby/object:Gem::Requirement