Regarding js2c.py…

I looked at using NASM to include JS files within the SilkJS binary.  It's way 
more optimal than generating cpp or cc files with arrays of the character data 
from the JS files.  Those cc files have to be run through the compiler, which 
isn't particularly fast.

The downside is NASM on OSX Mountain Lion (apple's latest and greatest) is 
still v0.98, which doesn't support -f macho64, so it's useless.

                global  _foo_js
_foo_js dw      _       foo_js_end-$
                incbin  'foo.js'
_foo_js_end


struct JS_FILE {
                unsigned short size;
                char data[1];
};

extern "c" { extern JS_FILE *foo_js; }


On Aug 5, 2012, at 4:20 AM, Jakob Kummerow <[email protected]> wrote:

> On Sun, Aug 5, 2012 at 2:06 AM, Flying Jester <[email protected]> wrote:
> 
> 
>  Yes, I have both Cygwin and Python 2.6. Both are the google supplied 
> versions.
> 
> And is cygwin checked out to precisely the path given in the instructions?
>  
> I'm not really sure how I could have made scons work without at least Python 
> 2.6. 
> I am also not really sure how having those can change what Visual C++ does.
> 
> GYP is kind of a meta-build system, it generates project files for a number 
> of other build systems (e.g. VS project files, Makefiles, Xcode project 
> files, Ninja files, it even has a SCons generator). GYP allows definition of 
> pretty arbitrary build steps, not just compilation. One such example that 
> we're using in V8 in the js2c step is "run this Python script here over this 
> set of .js files, that'll generate one or more .cc files which we'll need for 
> the subsequent C++ compile step". GYP translates this to MSVS project 
> definitions in such a way that to execute the step, Python and Cygwin must be 
> found (in the default locations; for Python having it in %PATH% should work 
> too). Every time I've seen your error message before, it was due to one of 
> the two not being where it should be.
> 
> Maybe someone else on this list has a suggestion what else might be going on. 
> When I start on a clean system and follow the instructions in the wiki, 
> everything works. (And not just for me: it also works on our buildbots at 
> http://build.chromium.org/p/client.v8/console.)
> 
> 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to