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 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3244 | 3244 |
3245 // Check whether the string is sequential. The only non-sequential | 3245 // Check whether the string is sequential. The only non-sequential |
3246 // shapes we support have just been unwrapped above. | 3246 // shapes we support have just been unwrapped above. |
3247 __ bind(&check_sequential); | 3247 __ bind(&check_sequential); |
3248 STATIC_ASSERT(kSeqStringTag == 0); | 3248 STATIC_ASSERT(kSeqStringTag == 0); |
3249 __ testb(result, Immediate(kStringRepresentationMask)); | 3249 __ testb(result, Immediate(kStringRepresentationMask)); |
3250 __ j(not_zero, deferred->entry()); | 3250 __ j(not_zero, deferred->entry()); |
3251 | 3251 |
3252 // Dispatch on the encoding: ASCII or two-byte. | 3252 // Dispatch on the encoding: ASCII or two-byte. |
3253 Label ascii_string; | 3253 Label ascii_string; |
3254 STATIC_ASSERT(kAsciiStringTag != 0); | 3254 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); |
| 3255 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); |
3255 __ testb(result, Immediate(kStringEncodingMask)); | 3256 __ testb(result, Immediate(kStringEncodingMask)); |
3256 __ j(not_zero, &ascii_string, Label::kNear); | 3257 __ j(not_zero, &ascii_string, Label::kNear); |
3257 | 3258 |
3258 // Two-byte string. | 3259 // Two-byte string. |
3259 // Load the two-byte character code into the result register. | 3260 // Load the two-byte character code into the result register. |
3260 Label done; | 3261 Label done; |
3261 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); | 3262 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize == 1); |
3262 __ movzxwl(result, FieldOperand(string, | 3263 __ movzxwl(result, FieldOperand(string, |
3263 index, | 3264 index, |
3264 times_2, | 3265 times_2, |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4146 RegisterEnvironmentForDeoptimization(environment); | 4147 RegisterEnvironmentForDeoptimization(environment); |
4147 ASSERT(osr_pc_offset_ == -1); | 4148 ASSERT(osr_pc_offset_ == -1); |
4148 osr_pc_offset_ = masm()->pc_offset(); | 4149 osr_pc_offset_ = masm()->pc_offset(); |
4149 } | 4150 } |
4150 | 4151 |
4151 #undef __ | 4152 #undef __ |
4152 | 4153 |
4153 } } // namespace v8::internal | 4154 } } // namespace v8::internal |
4154 | 4155 |
4155 #endif // V8_TARGET_ARCH_X64 | 4156 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |