b9org / b9

An educational JS virtual machine based on Eclipse OMR
http://www.base9.xyz
Apache License 2.0
45 stars 24 forks source link

Implement string comparsions in the JIT #211

Open nbhuiyan opened 6 years ago

nbhuiyan commented 6 years ago

Option 1: Replace std::string with internal string type (complex). This gives us a known layout for string, which would allow us to work directly with the underlying character array. Option 2: Dispatch to a string comparison jit helper where operands are Values. (easy) Do a string looking up the helper, not in the generated code.

Will go with option 2 unless people have other ideas.