aboutsummaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_script.h
diff options
context:
space:
mode:
authorKostadin Damyanov2015-08-09 12:45:21 +0300
committerKostadin Damyanov2015-08-09 12:45:21 +0300
commitcdf1ac7d58f3dc026cd316a66450771762d74432 (patch)
tree635ab608220b2940674098253efddbca7a69377a /modules/gdscript/gd_script.h
parentf5bfd497aab7e24a6f4dc0315e9e9333504067a0 (diff)
parentc2e2f2e0aebf6342e6f18ae5d67b6a825590675a (diff)
downloadgodot-cdf1ac7d58f3dc026cd316a66450771762d74432.tar.gz
godot-cdf1ac7d58f3dc026cd316a66450771762d74432.tar.zst
godot-cdf1ac7d58f3dc026cd316a66450771762d74432.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'modules/gdscript/gd_script.h')
-rw-r--r--modules/gdscript/gd_script.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 4672f3b8b..fe325ff71 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -349,6 +349,8 @@ public:
Error load_source_code(const String& p_path);
Error load_byte_code(const String& p_path);
+ Vector<uint8_t> get_as_byte_code() const;
+
virtual ScriptLanguage *get_language() const;
GDScript();
@@ -473,6 +475,19 @@ public:
}
+ virtual Vector<StackInfo> debug_get_current_stack_info() {
+ if (Thread::get_main_ID()!=Thread::get_caller_ID())
+ return Vector<StackInfo>();
+
+ Vector<StackInfo> csi;
+ csi.resize(_debug_call_stack_pos);
+ for(int i=0;i<_debug_call_stack_pos;i++) {
+ csi[_debug_call_stack_pos-i-1].line=_call_stack[i].line?*_call_stack[i].line:0;
+ csi[_debug_call_stack_pos-i-1].script=Ref<GDScript>(_call_stack[i].function->get_script());
+ }
+ return csi;
+ }
+
struct {
StringName _init;