Problems with the generated javascript #3

Open
Meai1 opened this Issue Apr 6, 2012 · 4 comments

Projects

None yet

2 participants

@Meai1
Meai1 commented Apr 6, 2012

I'm on Linux with Mono. I managed to compile everything c# related, and it works so far, but when I sort all the paths out, in the browser it still says: "$init$" is not defined.

If you want, I provide the whole mono project, you only need to put your own path int the custom after build event in Monodevelop.

http://dl.dropbox.com/u/700060/compiler.tar.gz

So I don't know into how many issues I should split this up, but can you translate the remaining polish(?) comments into english?

Also, since I'm evaluating making a monodevelop debugger, do you have tips on what kind of mapping will be needed, and how to do it? I'm a little confused, the resulting IL from the compiler is not real IL, so it can't be executed by mono right? Well, just general guidance, in the closed issue you mentioned that the mapping that others were working on, could possibly be reused and I'd be curious about that.

@mkol
Owner
mkol commented Apr 6, 2012

Oh. there are still polish comments in there. I will look at it

As $init$ not defined error - did you compiler.exe --publish to create packed version of il2js.js (this is related to #2). It it will not help - please let me know - I will look closer into your project.

For debugger you need to have the following:

  • mapping from il2js varibles/functions/classes into .net ones. This is partially (if not fully) done and saved in "log.xml", you may want to inject into generation to create more efficient data structure)
  • mapping from il2js function opcodes offsets into .net il opcodes offsets. This is harder part and involves a lot of code injections from your side into il2js opcodes generation. I will ask if others if they can provide a part of their work to you, however i recently have no contact with them. I will try however.
@mkol
Owner
mkol commented Apr 6, 2012

Also If you find any unclear/polish/missing-but-desider comments - you can directly mail me with references to these comments, and I will change is ASAP.

@Meai1
Meai1 commented Apr 6, 2012

Yes, doing a compiler.exe --publish did indeed work, thanks for the info. I think it will take a lot to understand the code enough to be able to make the necessary changes for a debugger... it's also still coupled with asp.net things and resources, html writing.. I think this stuff should not be done by a c#->js compiler project. Also I would need to learn IL too, no way around that. Well, we shall see.

@mkol
Owner
mkol commented Apr 6, 2012

Resources are used only when you use localized pages with multiple languages. Html writing is used when you use page generation on server side (generating html from .net language). I think these are not important from debugger point of view. Generated handler however is used for ajax calls and it is quite important.
Whole framework is language independent - I don't understand what you mean by "c#->js"? The idea was to use any .net language to program a web page, hence the framework works on .dll files. Indeed to understand what is going on there you need to learn il too. MSDN help is quite accure on that topic, however there are some unsaid things (even still there are some which i cannot find in any docunentation, including http://www.ecma-international.org/publications/standards/Ecma-335.htm .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment