ext/spidermonkey/debugger.c in jbarnette-johnson-1.0.0.200808062111 vs ext/spidermonkey/debugger.c in jbarnette-johnson-1.0.0.200811251942

- old
+ new

@@ -1,19 +1,31 @@ #include "debugger.h" #include "context.h" #include "conversions.h" #include "immutable_node.h" +/* + * call-seq: + * frame_pc(context, frame) + * + * Get the frame parse context + */ static VALUE frame_pc(VALUE UNUSED(self), VALUE context, VALUE frame) { JSContext * js = NULL; JSStackFrame * fp = NULL; Data_Get_Struct(context, JSContext, js); Data_Get_Struct(frame, JSStackFrame, fp); return Data_Wrap_Struct(rb_cObject, NULL, NULL, JS_GetFramePC(js, fp)); } +/* + * call-seq: + * line_number(context, script, bytecode) + * + * Get the line number of the +bytecode+ given +context+ and +script+ + */ static VALUE line_number(VALUE UNUSED(self), VALUE context, VALUE script, VALUE bytecode) { JSContext * js = NULL; JSScript * js_script = NULL; jsbytecode * js_bytecode = NULL; @@ -23,9 +35,15 @@ Data_Get_Struct(bytecode, jsbytecode, js_bytecode); return INT2NUM((long)JS_PCToLineNumber(js, js_script, js_bytecode)); } +/* + * call-seq: + * file_name(context, script) + * + * Get the file name of the +script+ given +context+ + */ static VALUE file_name(VALUE UNUSED(self), VALUE context, VALUE script) { JSContext * js = NULL; JSScript * js_script = NULL;