| Index: src/ia32/codegen-ia32.h
|
| ===================================================================
|
| --- src/ia32/codegen-ia32.h (revision 4526)
|
| +++ src/ia32/codegen-ia32.h (working copy)
|
| @@ -886,14 +886,15 @@
|
| class StringHelper : public AllStatic {
|
| public:
|
| // Generates fast code for getting a char code out of a string
|
| - // object at the given index. May bail out for three reasons (in the
|
| + // object at the given index. May bail out for four reasons (in the
|
| // listed order):
|
| // * Receiver is not a string (receiver_not_string label).
|
| - // * Index is not a positive smi (index_not_positive_smi label).
|
| + // * Index is not a smi (index_not_smi label).
|
| + // * Index is out of range (index_out_of_range).
|
| // * Some other reason (slow_case label). In this case it's
|
| // guaranteed that the above conditions are not violated,
|
| // e.g. it's safe to assume the receiver is a string and the
|
| - // index is a positive smi.
|
| + // index is a non-negative smi < length.
|
| // When successful, object, index, and scratch are clobbered.
|
| // Otherwise, scratch and result are clobbered.
|
| static void GenerateFastCharCodeAt(MacroAssembler* masm,
|
| @@ -902,7 +903,8 @@
|
| Register scratch,
|
| Register result,
|
| Label* receiver_not_string,
|
| - Label* index_not_positive_smi,
|
| + Label* index_not_smi,
|
| + Label* index_out_of_range,
|
| Label* slow_case);
|
|
|
| // Generates code for creating a one-char string from the given char
|
|
|