Update to the FAQ.
authorMiguel de Icaza <miguel@gnome.org>
Tue, 31 Jul 2001 21:12:47 +0000 (21:12 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 31 Jul 2001 21:12:47 +0000 (21:12 -0000)
Beautified the code.

svn path=/trunk/mono/; revision=358

doc/faq
mono/interpreter/ChangeLog
mono/interpreter/interp.c
web/faq

diff --git a/doc/faq b/doc/faq
index 0b4d739409391e15e00755790a8dc6184de97425..8afd5f784134b10cb50bef8e58ebd24a4467f8f8 100644 (file)
--- a/doc/faq
+++ b/doc/faq
@@ -301,6 +301,15 @@ Q: Will Mono include compatibility with Bonobo components?
 A: Yes, we will provide a set of classes for implementing and using
    Bonobo components from within Mono. 
 
+Q: Does Mono replace Bonobo?
+
+A: Bonobo is very focused on cross-application component reuse.  Mono
+   will provide a Bonobo framework to allow you to develop Bonobo
+   components and use Bonobo components on Unix.  
+
+   Mono should allow you to write Bonobo components more easily, just
+   like .NET on Windows allows you to export .NET components to COM.
+
 ** Mono and the Web
 
 Q: Is Mono a way of running Java applets?
index aaa700ec6827af78cc8b3603cf7cdbec2b31db4c..f1b53985c560daf583df8d97c715fded5ffb153e 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-31  Miguel de Icaza  <miguel@ximian.com>
+
+       * interp.c (ves_exec_method): Cleanup of the source code.
+
 Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
 
        * interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
index 8fe1df33dd646514d867a001a6168b7a4183ed93..00ec678a3ad6ff04bbac8bda4e84335ff6f7380c 100644 (file)
@@ -319,6 +319,37 @@ static char *opcode_names[] = {
 };
 #endif
 
+static void
+output_indent (void)
+{
+       int h;
+
+       for (h = 0; h < level; h++)
+               g_print ("  ");
+}
+
+static void
+dump_stack (stackval *stack, stackval *sp)
+{
+       stackval *s = stack;
+       
+       if (sp == stack)
+               return;
+       
+       output_indent ();
+       g_print ("stack: ");
+               
+       while (s < sp) {
+               switch (s->type) {
+               case VAL_I32: g_print ("[%d] ", s->data.i); break;
+               case VAL_I64: g_print ("[%lld] ", s->data.l); break;
+               case VAL_DOUBLE: g_print ("[%0.5f] ", s->data.f); break;
+               default: g_print ("[%p] ", s->data.p); break;
+               }
+               ++s;
+       }
+}
+
 /*
  * Need to optimize ALU ops when natural int == int32 
  *
@@ -336,9 +367,7 @@ static char *opcode_names[] = {
 static void 
 ves_exec_method (MonoMethod *mh, stackval *args)
 {
-#if DEBUG_INTERP
-       static int level = 0;
-#endif
+       static int debug_level = 0;
        MonoMethodManaged *mm = (MonoMethodManaged *)mh;
        stackval *stack;
        register const unsigned char *ip;
@@ -354,9 +383,8 @@ ves_exec_method (MonoMethod *mh, stackval *args)
        ip = mm->header->code;
 
 #if DEBUG_INTERP
-#define INDENT() { int h; for (h=0; h < level; ++h) g_print ("  "); }
        level++;
-       INDENT();
+       output_indent ();
        g_print ("Entering %s\n", mh->name);
 #endif
 
@@ -383,22 +411,12 @@ ves_exec_method (MonoMethod *mh, stackval *args)
        while (1) {
                /*g_assert (sp >= stack);*/
 #if DEBUG_INTERP
-               if (sp != stack){
-                       stackval *s = stack;
-                       INDENT(); g_print ("stack: ");
-                       while (s < sp) {
-                               switch (s->type) {
-                               case VAL_I32: g_print ("[%d] ", s->data.i); break;
-                               case VAL_I64: g_print ("[%lld] ", s->data.l); break;
-                               case VAL_DOUBLE: g_print ("[%0.5f] ", s->data.f); break;
-                               default: g_print ("[%p] ", s->data.p); break;
-                               }
-                               ++s;
-                       }
-               }
+               dump_stack (stack, sp);
                g_print ("\n");
                INDENT();
-               g_print ("0x%04x: %s\n", ip-(unsigned char*)mm->header->code, *ip == 0xfe ? opcode_names [256 + ip [1]]: opcode_names [*ip]);
+               g_print ("0x%04x: %s\n",
+                        ip-(unsigned char*)mm->header->code,
+                        *ip == 0xfe ? opcode_names [256 + ip [1]] : opcode_names [*ip]);
 #endif
                
                SWITCH (*ip) {
@@ -580,9 +598,9 @@ ves_exec_method (MonoMethod *mh, stackval *args)
                        if (sp > stack)
                                g_warning ("more values on stack: %d", sp-stack);
 
-                       /*g_free (stack);*/
+                       /* g_free (stack); */
 #if DEBUG_INTERP
-                       level--;
+                       debug_level--;
 #endif
                        return;
                CASE (CEE_BR_S)
@@ -1040,13 +1058,16 @@ ves_exec_method (MonoMethod *mh, stackval *args)
                        token = read32 (ip);
                        o = newobj (mh->image, token);
                        ip += 4;
+                       
                        /* call the contructor */
                        cmh = mono_get_method (mh->image, token);
 
-                       /* decrement by the actual number of args */
-                       /* need to pass object as first arg: we may overflow the stack here
-                        * until we use a different argument passing mechanism. */
-                       /* we shift the args to make room for the object reference */
+                       /*
+                        * decrement by the actual number of args 
+                        * need to pass object as first arg: we may overflow the stack here
+                        * until we use a different argument passing mechanism. 
+                        * we shift the args to make room for the object reference
+                        */
                        for (pc = 0; pc < cmh->signature->param_count; ++pc)
                                sp [-pc] = sp [-pc-1];
                        sp -= cmh->signature->param_count + 1;
@@ -1055,9 +1076,13 @@ ves_exec_method (MonoMethod *mh, stackval *args)
 
                        g_assert (cmh->signature->call_convention == MONO_CALL_DEFAULT);
 
-                       /* we need to truncate according to the type of args ... */
+                       /*
+                        * we need to truncate according to the type of args ...
+                        */
                        ves_exec_method (cmh, sp);
-                       /* a constructor returns void, but we need to return the object we created */
+                       /*
+                        * a constructor returns void, but we need to return the object we created
+                        */
                        sp->type = VAL_OBJ;
                        sp->data.p = o;
                        ++sp;
diff --git a/web/faq b/web/faq
index 0b4d739409391e15e00755790a8dc6184de97425..8afd5f784134b10cb50bef8e58ebd24a4467f8f8 100644 (file)
--- a/web/faq
+++ b/web/faq
@@ -301,6 +301,15 @@ Q: Will Mono include compatibility with Bonobo components?
 A: Yes, we will provide a set of classes for implementing and using
    Bonobo components from within Mono. 
 
+Q: Does Mono replace Bonobo?
+
+A: Bonobo is very focused on cross-application component reuse.  Mono
+   will provide a Bonobo framework to allow you to develop Bonobo
+   components and use Bonobo components on Unix.  
+
+   Mono should allow you to write Bonobo components more easily, just
+   like .NET on Windows allows you to export .NET components to COM.
+
 ** Mono and the Web
 
 Q: Is Mono a way of running Java applets?