[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] libjit ./ChangeLog jit/jit-internal.h jit/jit-f...
From: |
Aleksey Demakov |
Subject: |
[dotgnu-pnet-commits] libjit ./ChangeLog jit/jit-internal.h jit/jit-f... |
Date: |
Sun, 18 Dec 2005 17:44:54 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: libjit
Branch:
Changes by: Aleksey Demakov <address@hidden> 05/12/18 17:44:54
Modified files:
. : ChangeLog
jit : jit-internal.h jit-function.c jit-except.c
Log message:
Implemented jit_stack_trace_get_offset()
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/ChangeLog.diff?tr1=1.179&tr2=1.180&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/jit/jit-internal.h.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/jit/jit-function.c.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libjit/jit/jit-except.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: libjit/ChangeLog
diff -u libjit/ChangeLog:1.179 libjit/ChangeLog:1.180
--- libjit/ChangeLog:1.179 Thu Dec 15 18:10:09 2005
+++ libjit/ChangeLog Sun Dec 18 17:44:54 2005
@@ -1,3 +1,12 @@
+2005-12-18 Aleksey Demakov <address@hidden>
+
+ * jit/jit-internal.h, jit/jit-function.c (jit_function_compile):
+ Add cache_start field to the jit_function struct, set it to the start
+ of the function code cache.
+
+ * jit/jit-except.c (jit_stack_trace_get_offset): implement the
+ function.
+
2005-12-15 Aleksey Demakov <address@hidden>
* jit/jit-insn.c (jit_insn_address_of): return null if the value is
Index: libjit/jit/jit-except.c
diff -u libjit/jit/jit-except.c:1.3 libjit/jit/jit-except.c:1.4
--- libjit/jit/jit-except.c:1.3 Mon May 24 04:19:43 2004
+++ libjit/jit/jit-except.c Sun Dec 18 17:44:54 2005
@@ -415,8 +415,28 @@
unsigned int jit_stack_trace_get_offset
(jit_context_t context, jit_stack_trace_t trace, unsigned int posn)
{
- /* TODO */
- return 0;
+ if(trace && posn < trace->size)
+ {
+ jit_cache_t cache = _jit_context_get_cache(context);
+ if(cache)
+ {
+ jit_function_t func = (jit_function_t)
_jit_cache_get_method
+ (cache, trace->items[posn], 0);
+ if (func)
+ {
+#ifdef JIT_PROLOG_SIZE
+ unsigned long offset = trace->items[posn] -
func->cache_start;
+ return _jit_cache_get_bytecode
+ (cache, func->cache_start, offset, 0);
+#else
+ unsigned long offset = trace->items[posn] -
func->entry_point;
+ return _jit_cache_get_bytecode
+ (cache, func->entry_point, offset, 0);
+#endif
+ }
+ }
+ }
+ return JIT_CACHE_NO_OFFSET;
}
/*@
Index: libjit/jit/jit-function.c
diff -u libjit/jit/jit-function.c:1.14 libjit/jit/jit-function.c:1.15
--- libjit/jit/jit-function.c:1.14 Tue Nov 2 06:22:07 2004
+++ libjit/jit/jit-function.c Sun Dec 18 17:44:54 2005
@@ -684,6 +684,7 @@
end = gen.posn.ptr;
#ifdef JIT_PROLOG_SIZE
+ func->cache_start = start;
/* Back-patch the function prolog and get the real entry point
*/
if(have_prolog)
{
Index: libjit/jit/jit-internal.h
diff -u libjit/jit/jit-internal.h:1.17 libjit/jit/jit-internal.h:1.18
--- libjit/jit/jit-internal.h:1.17 Wed Oct 6 05:43:15 2004
+++ libjit/jit/jit-internal.h Sun Dec 18 17:44:54 2005
@@ -387,6 +387,12 @@
/* The function to call to perform on-demand compilation */
jit_on_demand_func on_demand;
+ /* TODO: This field is used only if JIT_PROLOG_SIZE is defined.
+ However the header that defines it is included after this one
+ so "#ifdef JIT_PROLOG_SIZE" does not work here. */
+ /* The start of the code cache. */
+ void * cache_start;
+
#ifdef jit_redirector_size
/* Buffer that contains the redirector for this function.
Redirectors are used to support on-demand compilation */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] libjit ./ChangeLog jit/jit-internal.h jit/jit-f...,
Aleksey Demakov <=