Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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."



It'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/bytecode...

2 - http://code.google.com/p/v8/source/browse/trunk/src/x64/rege...


Well I might got it wrong but I got the bytecode reference from here:

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: