Permalink
Browse files

Mon Sep 24 18:49:01 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* x86/tramp.c: don't change a MONO_TYPE_STRING to a char*
	when it's an argument to an internalcall.


Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
	mono_string_intern () to implement the semantics of the ldstr opcode
	and the interning of System.Strings.
	* icall.c: provide hooks to make String::IsIntern and String::Intern
	internalcalls.


Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>

	* interp.c: catch a few more error conditions with exceptions instead of
	erroring out.
	Don't use g_print() in stack traces because it doesn't work with
	some float values.
	When we call an instance method of a valuetype class, unbox the 'this'
	argument if it is an object.
	Use mono_ldstr () to implement the ldstr opcode: it takes care of
	interning the string if necessary.
	Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
	Fixes to handle NaNs when comparing doubles.
	Make sure the loaded assembly has an entry point defined.
	Fixed portability bugs in neg and not opcodes.

svn path=/trunk/mono/; revision=943
  • Loading branch information...
1 parent f8fddf0 commit 78550fa962237d4fbb8a84ce2540d7d995bb15c0 @illupus illupus committed Sep 24, 2001
View
@@ -1,4 +1,9 @@
+Mon Sep 24 18:49:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
+
+ * x86/tramp.c: don't change a MONO_TYPE_STRING to a char*
+ when it's an argument to an internalcall.
+
Sun Sep 23 13:44:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
* x86/tramp.c: handle MONO_TYPE_CLASS in trampolines.
View
@@ -10,6 +10,7 @@
#include "config.h"
#include "x86-codegen.h"
#include "mono/metadata/class.h"
+#include "mono/metadata/tabledefs.h"
#include "mono/interpreter/interp.h"
/*
@@ -149,10 +150,12 @@ mono_create_trampoline (MonoMethod *method)
continue;
}
switch (sig->params [i - 1]->type) {
+ case MONO_TYPE_BOOLEAN:
case MONO_TYPE_I1:
case MONO_TYPE_U1:
case MONO_TYPE_I2:
case MONO_TYPE_U2:
+ case MONO_TYPE_CHAR:
case MONO_TYPE_I4:
case MONO_TYPE_U4:
case MONO_TYPE_I:
@@ -170,6 +173,14 @@ mono_create_trampoline (MonoMethod *method)
x86_fst_membase (p, X86_ESP, 0, TRUE, TRUE);
break;
case MONO_TYPE_STRING:
+ /*
+ * If it is an internalcall we assume it's the object we want.
+ * Yet another reason why MONO_TYPE_STRING should not be used to indicate char*.
+ */
+ if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) {
+ x86_push_membase (p, X86_EDX, arg_pos);
+ break;
+ }
/*if (frame->method->flags & PINVOKE_ATTRIBUTE_CHAR_SET_ANSI*/
x86_push_membase (p, X86_EDX, arg_pos);
x86_mov_reg_imm (p, X86_EDX, mono_get_ansi_string);
@@ -190,8 +201,6 @@ mono_create_trampoline (MonoMethod *method)
x86_push_membase (p, X86_EDX, arg_pos + 4);
x86_push_membase (p, X86_EDX, arg_pos);
break;
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
default:
g_error ("Can't trampoline 0x%x", sig->params [i - 1]->type);
}
@@ -256,11 +265,13 @@ mono_create_trampoline (MonoMethod *method)
/*
* free the allocated strings.
*/
- if (local_size)
- x86_mov_reg_imm (p, X86_EDX, g_free);
- for (i = 1; i <= local_size; ++i) {
- x86_push_membase (p, X86_EBP, LOC_POS * i);
- x86_call_reg (p, X86_EDX);
+ if (!(method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)) {
+ if (local_size)
+ x86_mov_reg_imm (p, X86_EDX, g_free);
+ for (i = 1; i <= local_size; ++i) {
+ x86_push_membase (p, X86_EBP, LOC_POS * i);
+ x86_call_reg (p, X86_EDX);
+ }
}
/*
* Standard epilog.
View
@@ -1,3 +1,19 @@
+
+Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
+
+ * interp.c: catch a few more error conditions with exceptions instead of
+ erroring out.
+ Don't use g_print() in stack traces because it doesn't work with
+ some float values.
+ When we call an instance method of a valuetype class, unbox the 'this'
+ argument if it is an object.
+ Use mono_ldstr () to implement the ldstr opcode: it takes care of
+ interning the string if necessary.
+ Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
+ Fixes to handle NaNs when comparing doubles.
+ Make sure the loaded assembly has an entry point defined.
+ Fixed portability bugs in neg and not opcodes.
+
2001-09-24 Dietmar Maurer <dietmar@ximian.com>
* interp.c (ves_exec_method): LDC_I4: 8bit constants are signed
Oops, something went wrong.

0 comments on commit 78550fa

Please sign in to comment.