OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3373 | 3373 |
3374 __ bind(&seq_two_byte_string); | 3374 __ bind(&seq_two_byte_string); |
3375 // eax: subject string (flat two byte) | 3375 // eax: subject string (flat two byte) |
3376 // ecx: RegExp data (FixedArray) | 3376 // ecx: RegExp data (FixedArray) |
3377 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataUC16CodeOffset)); | 3377 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataUC16CodeOffset)); |
3378 __ Set(edi, Immediate(0)); // Type is two byte. | 3378 __ Set(edi, Immediate(0)); // Type is two byte. |
3379 | 3379 |
3380 __ bind(&check_code); | 3380 __ bind(&check_code); |
3381 // Check that the irregexp code has been generated for the actual string | 3381 // Check that the irregexp code has been generated for the actual string |
3382 // encoding. If it has, the field contains a code object otherwise it contains | 3382 // encoding. If it has, the field contains a code object otherwise it contains |
3383 // the hole. | 3383 // a smi (code flushing support). |
3384 __ CmpObjectType(edx, CODE_TYPE, ebx); | 3384 __ JumpIfSmi(edx, &runtime); |
3385 __ j(not_equal, &runtime); | 3385 __ j(not_equal, &runtime); |
Erik Corry
2011/06/30 18:48:25
This j is superfluous.
Rico
2011/07/01 05:58:09
Done.
| |
3386 | 3386 |
3387 // eax: subject string | 3387 // eax: subject string |
3388 // edx: code | 3388 // edx: code |
3389 // edi: encoding of subject string (1 if ascii, 0 if two_byte); | 3389 // edi: encoding of subject string (1 if ascii, 0 if two_byte); |
3390 // Load used arguments before starting to push arguments for call to native | 3390 // Load used arguments before starting to push arguments for call to native |
3391 // RegExp code to avoid handling changing stack height. | 3391 // RegExp code to avoid handling changing stack height. |
3392 __ mov(ebx, Operand(esp, kPreviousIndexOffset)); | 3392 __ mov(ebx, Operand(esp, kPreviousIndexOffset)); |
3393 __ SmiUntag(ebx); // Previous index from smi. | 3393 __ SmiUntag(ebx); // Previous index from smi. |
3394 | 3394 |
3395 // eax: subject string | 3395 // eax: subject string |
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6349 __ Drop(1); | 6349 __ Drop(1); |
6350 __ ret(2 * kPointerSize); | 6350 __ ret(2 * kPointerSize); |
6351 } | 6351 } |
6352 | 6352 |
6353 | 6353 |
6354 #undef __ | 6354 #undef __ |
6355 | 6355 |
6356 } } // namespace v8::internal | 6356 } } // namespace v8::internal |
6357 | 6357 |
6358 #endif // V8_TARGET_ARCH_IA32 | 6358 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |