Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3255 | 3255 |
| 3256 | 3256 |
| 3257 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( | 3257 void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( |
| 3258 Register first, | 3258 Register first, |
| 3259 Register second, | 3259 Register second, |
| 3260 Register scratch1, | 3260 Register scratch1, |
| 3261 Register scratch2, | 3261 Register scratch2, |
| 3262 Label* failure) { | 3262 Label* failure) { |
| 3263 int kFlatAsciiStringMask = | 3263 int kFlatAsciiStringMask = |
| 3264 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 3264 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
| 3265 int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 3265 // Use ASCII_INTERNALIZED_STRING_TYPE because it's internalized bit is zero. |
| 3266 // Since we don't include that bit in the mask above, the test below will | |
| 3267 // succeed for ASCII_STRING_TYPE and ASCII_INTERNALIZED_STRING_TYPE. | |
| 3268 STATIC_ASSERT(kInternalizedTag == 0); | |
| 3269 const int kFlatAsciiStringTag = ASCII_INTERNALIZED_STRING_TYPE; | |
|
Yang
2013/07/22 09:09:46
I actually prefer not to use the defined instance
mvstanton
2013/07/22 09:40:17
Done.
| |
| 3266 and_(scratch1, first, Operand(kFlatAsciiStringMask)); | 3270 and_(scratch1, first, Operand(kFlatAsciiStringMask)); |
| 3267 and_(scratch2, second, Operand(kFlatAsciiStringMask)); | 3271 and_(scratch2, second, Operand(kFlatAsciiStringMask)); |
| 3268 cmp(scratch1, Operand(kFlatAsciiStringTag)); | 3272 cmp(scratch1, Operand(kFlatAsciiStringTag)); |
| 3269 // Ignore second test if first test failed. | 3273 // Ignore second test if first test failed. |
| 3270 cmp(scratch2, Operand(kFlatAsciiStringTag), eq); | 3274 cmp(scratch2, Operand(kFlatAsciiStringTag), eq); |
| 3271 b(ne, failure); | 3275 b(ne, failure); |
| 3272 } | 3276 } |
| 3273 | 3277 |
| 3274 | 3278 |
| 3275 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, | 3279 void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type, |
| 3276 Register scratch, | 3280 Register scratch, |
| 3277 Label* failure) { | 3281 Label* failure) { |
| 3278 int kFlatAsciiStringMask = | 3282 int kFlatAsciiStringMask = |
| 3279 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 3283 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
| 3280 int kFlatAsciiStringTag = ASCII_STRING_TYPE; | 3284 int kFlatAsciiStringTag = ASCII_STRING_TYPE; |
|
Yang
2013/07/22 09:09:46
I believe this suffers from the same issue!
mvstanton
2013/07/22 09:40:17
Grr. Removed defined instance check here too, than
| |
| 3281 and_(scratch, type, Operand(kFlatAsciiStringMask)); | 3285 and_(scratch, type, Operand(kFlatAsciiStringMask)); |
| 3282 cmp(scratch, Operand(kFlatAsciiStringTag)); | 3286 cmp(scratch, Operand(kFlatAsciiStringTag)); |
| 3283 b(ne, failure); | 3287 b(ne, failure); |
| 3284 } | 3288 } |
| 3285 | 3289 |
| 3286 static const int kRegisterPassedArguments = 4; | 3290 static const int kRegisterPassedArguments = 4; |
| 3287 | 3291 |
| 3288 | 3292 |
| 3289 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, | 3293 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, |
| 3290 int num_double_arguments) { | 3294 int num_double_arguments) { |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3831 void CodePatcher::EmitCondition(Condition cond) { | 3835 void CodePatcher::EmitCondition(Condition cond) { |
| 3832 Instr instr = Assembler::instr_at(masm_.pc_); | 3836 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3833 instr = (instr & ~kCondMask) | cond; | 3837 instr = (instr & ~kCondMask) | cond; |
| 3834 masm_.emit(instr); | 3838 masm_.emit(instr); |
| 3835 } | 3839 } |
| 3836 | 3840 |
| 3837 | 3841 |
| 3838 } } // namespace v8::internal | 3842 } } // namespace v8::internal |
| 3839 | 3843 |
| 3840 #endif // V8_TARGET_ARCH_ARM | 3844 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |