[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-function.h inc...
From: |
Aleksey Demakov |
Subject: |
[dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-function.h inc... |
Date: |
Thu, 20 Dec 2007 13:47:23 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: libjit
Changes by: Aleksey Demakov <avd> 07/12/20 13:47:23
Modified files:
. : ChangeLog
include/jit : jit-function.h jit-plus.h
jit : jit-function.c
jitplus : jit-plus-context.cpp jit-plus-function.cpp
tutorial : t3.c t4.cpp
Log message:
remove jit_function_recompile
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/ChangeLog?cvsroot=dotgnu-pnet&r1=1.325&r2=1.326
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-function.h?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/libjit/include/jit/jit-plus.h?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/libjit/jit/jit-function.c?cvsroot=dotgnu-pnet&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/libjit/jitplus/jit-plus-context.cpp?cvsroot=dotgnu-pnet&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libjit/jitplus/jit-plus-function.cpp?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/libjit/tutorial/t3.c?cvsroot=dotgnu-pnet&r1=1.1.1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/libjit/tutorial/t4.cpp?cvsroot=dotgnu-pnet&r1=1.1.1.1&r2=1.2
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/ChangeLog,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -b -r1.325 -r1.326
--- ChangeLog 17 Dec 2007 17:57:28 -0000 1.325
+++ ChangeLog 20 Dec 2007 13:47:22 -0000 1.326
@@ -1,3 +1,15 @@
+2007-12-20 Aleksey Demakov <address@hidden>
+
+ * include/jit/jit-plus.h: add jit_context::build_start() and
+ jit_context::build_end() methods.
+
+ * include/jit/jit-function.h, jit/jit-function.c
+ (jit_function_recompile): remove.
+ * include/jit/jit-plus.h, jitplus/jit-plus-function.cpp
+ (jit_function::recompile): remove.
+ * tutorial/t3.c, tutorial/t4.cpp: recompile manually
+ instead of using removed recompile functions.
+
2007-12-16 Klaus Treichel <address@hidden>
* configure.in: Add support for multi os archs (like x86_64). Put the
Index: include/jit/jit-function.h
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/include/jit/jit-function.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- include/jit/jit-function.h 7 Oct 2007 14:16:50 -0000 1.6
+++ include/jit/jit-function.h 20 Dec 2007 13:47:23 -0000 1.7
@@ -48,7 +48,6 @@
jit_block_t jit_function_get_current(jit_function_t func) JIT_NOTHROW;
jit_function_t jit_function_get_nested_parent(jit_function_t func) JIT_NOTHROW;
int jit_function_compile(jit_function_t func) JIT_NOTHROW;
-int jit_function_recompile(jit_function_t func) JIT_NOTHROW;
int jit_function_is_compiled(jit_function_t func) JIT_NOTHROW;
void jit_function_set_recompilable(jit_function_t func) JIT_NOTHROW;
void jit_function_clear_recompilable(jit_function_t func) JIT_NOTHROW;
Index: include/jit/jit-plus.h
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/include/jit/jit-plus.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- include/jit/jit-plus.h 8 Nov 2007 17:31:42 -0000 1.13
+++ include/jit/jit-plus.h 20 Dec 2007 13:47:23 -0000 1.14
@@ -117,6 +117,8 @@
jit_context(jit_context_t context);
~jit_context();
+ void build_start() { jit_context_build_start(context); }
+ void build_end() { jit_context_build_end(context); }
jit_context_t raw() const { return context; }
private:
@@ -146,8 +148,6 @@
int is_compiled() const { return jit_function_is_compiled(func); }
- int recompile();
-
int is_recompilable() const { return
jit_function_is_recompilable(func); }
void set_recompilable() { jit_function_set_recompilable(func); }
Index: jit/jit-function.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-function.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- jit/jit-function.c 7 Oct 2007 14:16:50 -0000 1.31
+++ jit/jit-function.c 20 Dec 2007 13:47:23 -0000 1.32
@@ -1032,58 +1032,6 @@
}
/*@
- * @deftypefun int jit_function_recompile (jit_function_t func)
- * Force @code{func} to be recompiled, by calling its on-demand
- * compiler again. It is highly recommended that you set the
- * recompilable flag with @code{jit_function_set_recompilable}
- * when you initially create the function.
- *
- * This function returns one of @code{JIT_RESULT_OK},
- * @code{JIT_RESULT_COMPILE_ERROR}, or @code{JIT_RESULT_OUT_OF_MEMORY}.
- * @end deftypefun
address@hidden/
-int jit_function_recompile(jit_function_t func)
-{
- int result;
-
- /* Lock down the context */
- jit_context_build_start(func->context);
-
- /* Call the user's on-demand compiler if we don't have a builder yet.
- Bail out with an error if there is no on-demand compiler */
- if(!(func->builder))
- {
- if(func->on_demand)
- {
- result = (*(func->on_demand))(func);
- if(result != JIT_RESULT_OK)
- {
- _jit_function_free_builder(func);
- jit_context_build_end(func->context);
- return result;
- }
- }
- else
- {
- jit_context_build_end(func->context);
- return JIT_RESULT_COMPILE_ERROR;
- }
- }
-
- /* Compile the function */
- if(!jit_function_compile(func))
- {
- _jit_function_free_builder(func);
- jit_context_build_end(func->context);
- return JIT_RESULT_OUT_OF_MEMORY;
- }
-
- /* Unlock the context and report that we are ready to go */
- jit_context_build_end(func->context);
- return JIT_RESULT_OK;
-}
-
-/*@
* @deftypefun int jit_function_is_compiled (jit_function_t func)
* Determine if a function has already been compiled.
* @end deftypefun
Index: jitplus/jit-plus-context.cpp
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jitplus/jit-plus-context.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- jitplus/jit-plus-context.cpp 30 Apr 2004 23:30:35 -0000 1.1.1.1
+++ jitplus/jit-plus-context.cpp 20 Dec 2007 13:47:23 -0000 1.2
@@ -73,6 +73,15 @@
}
/*@
+ * @deftypemethod jit_context void build_start ()
+ * Start an explicit build process. Not needed if you will be using
+ * on-demand compilation.
+ * @end deftypemethod
+ *
+ * @deftypemethod jit_context void build_end ()
+ * End an explicit build process.
+ * @end deftypemethod
+ *
* @deftypemethod jit_context jit_context_t raw () const
* Get the raw C context pointer that underlies this object.
* @end deftypemethod
Index: jitplus/jit-plus-function.cpp
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jitplus/jit-plus-function.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- jitplus/jit-plus-function.cpp 8 Nov 2007 17:31:42 -0000 1.13
+++ jitplus/jit-plus-function.cpp 20 Dec 2007 13:47:23 -0000 1.14
@@ -241,33 +241,6 @@
}
/*@
- * @deftypemethod jit_function int recompile ()
- * Force a function to be recompiled.
- * @end deftypemethod
- *
- * @deftypemethod jit_function int is_recompilable () const
- * Determine if this function is recompilable.
- * @end deftypemethod
- *
- * @deftypemethod jit_function void set_recompilable ()
- * @deftypemethodx jit_function void clear_recompilable ()
- * @deftypemethodx jit_function void set_recompilable (int flag)
- * Modify the "recompilable" flag on this function.
- * @end deftypemethod
address@hidden/
-int jit_function::recompile()
-{
- if(!func)
- {
- return JIT_RESULT_COMPILE_ERROR;
- }
- else
- {
- return jit_function_recompile(func);
- }
-}
-
-/*@
* @deftypemethod jit_function void set_optimization_level ({unsigned int}
level)
* @deftypemethodx jit_function {unsigned int} optimization_level () const
* Set or get the optimization level for this function.
Index: tutorial/t3.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/tutorial/t3.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- tutorial/t3.c 30 Apr 2004 23:30:37 -0000 1.1.1.1
+++ tutorial/t3.c 20 Dec 2007 13:47:23 -0000 1.2
@@ -95,7 +95,10 @@
/* Force the function to be recompiled. Normally we'd use another
on-demand compiler with greater optimization capabilities */
- jit_function_recompile(function);
+ jit_context_build_start(context);
+ jit_function_get_on_demand_compiler(function)(function);
+ jit_function_compile(function);
+ jit_context_build_end(context);
/* Execute the function a third time, after it is recompiled */
arg1 = 2;
Index: tutorial/t4.cpp
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/tutorial/t4.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- tutorial/t4.cpp 30 Apr 2004 23:30:37 -0000 1.1.1.1
+++ tutorial/t4.cpp 20 Dec 2007 13:47:23 -0000 1.2
@@ -25,9 +25,10 @@
set_recompilable();
}
+ virtual void build();
+
protected:
virtual jit_type_t create_signature();
- virtual void build();
};
jit_type_t mul_add_function::create_signature()
@@ -83,7 +84,10 @@
printf("mul_add(13, 5, 7) = %d\n", (int)result);
// Force the function to be recompiled.
- mul_add.recompile();
+ mul_add.build_start();
+ mul_add.build();
+ mul_add.compile();
+ mul_add.build_end();
// Execute the function a third time, after it is recompiled.
arg1 = 2;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] libjit ChangeLog include/jit/jit-function.h inc...,
Aleksey Demakov <=