3 ms·
As far as I know Irregexp[1] compiles on V8 byte code so you can't use it isolated without V8. Please, let me know if you find the opposite. [1] http://blog.c
by pmelendez 13y ago
As far as I know Irregexp[1] compiles on V8 byte code so you can't use it isolated without V8.
Please, let me know if you find the opposite.
[1] http://blog.chromium.org/2009/02/irregexp-google-chromes-new-regexp.html http://blog.chromium.org/2009/02/irregexp-google-chromes-new...
- z92 13y ago> Irregexp[1] compiles on V8 byte code I was thinking: but V8 doesn't have byte code. Then opened the link: "After optimization we generate native machine code which uses backtracking to try different alternatives."
- pmelendez 13y agoWell I might got it wrong but I got the bytecode reference from here: http://v8.googlecode.com/svn/trunk/src/interpreter-irregexp.cc http://v8.googlecode.com/svn/trunk/src/interpreter-irregexp.... Skimming the code it does look like they are interpreting byte code from Irregexp but I would need to read further to say it for sure.
- ahomescu1 13y agoIt's not JavaScript bytecode, but regex bytecode. V8 parses regular expressions to regex ASTs, takes them through some more intermediate forms, then finally to a special regex bytecode. That bytecode is either interpreted, or JIT compiled (depending of some build options, I think). You can look at a list of bytecodes in [1], and at the x64 JIT in [2]. 1 - http://code.google.com/p/v8/source/browse/trunk/src/bytecodes-irregexp.h http://code.google.com/p/v8/source/browse/trunk/src/bytecode... 2 - http://code.google.com/p/v8/source/browse/trunk/src/x64/regexp-macro-assembler-x64.cc http://code.google.com/p/v8/source/browse/trunk/src/x64/rege...