| 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 7094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7105 // |done| label if a property with the given name is found. Jump to | 7105 // |done| label if a property with the given name is found. Jump to |
| 7106 // the |miss| label otherwise. | 7106 // the |miss| label otherwise. |
| 7107 // If lookup was successful |scratch2| will be equal to elements + 4 * index. | 7107 // If lookup was successful |scratch2| will be equal to elements + 4 * index. |
| 7108 void StringDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm, | 7108 void StringDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm, |
| 7109 Label* miss, | 7109 Label* miss, |
| 7110 Label* done, | 7110 Label* done, |
| 7111 Register elements, | 7111 Register elements, |
| 7112 Register name, | 7112 Register name, |
| 7113 Register scratch1, | 7113 Register scratch1, |
| 7114 Register scratch2) { | 7114 Register scratch2) { |
| 7115 ASSERT(!elements.is(scratch1)); |
| 7116 ASSERT(!elements.is(scratch2)); |
| 7117 ASSERT(!name.is(scratch1)); |
| 7118 ASSERT(!name.is(scratch2)); |
| 7119 |
| 7115 // Assert that name contains a string. | 7120 // Assert that name contains a string. |
| 7116 if (FLAG_debug_code) __ AbortIfNotString(name); | 7121 if (FLAG_debug_code) __ AbortIfNotString(name); |
| 7117 | 7122 |
| 7118 // Compute the capacity mask. | 7123 // Compute the capacity mask. |
| 7119 __ lw(scratch1, FieldMemOperand(elements, kCapacityOffset)); | 7124 __ lw(scratch1, FieldMemOperand(elements, kCapacityOffset)); |
| 7120 __ sra(scratch1, scratch1, kSmiTagSize); // convert smi to int | 7125 __ sra(scratch1, scratch1, kSmiTagSize); // convert smi to int |
| 7121 __ Subu(scratch1, scratch1, Operand(1)); | 7126 __ Subu(scratch1, scratch1, Operand(1)); |
| 7122 | 7127 |
| 7123 // Generate an unrolled loop that performs a few probes before | 7128 // Generate an unrolled loop that performs a few probes before |
| 7124 // giving up. Measurements done on Gmail indicate that 2 probes | 7129 // giving up. Measurements done on Gmail indicate that 2 probes |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7541 | 7546 |
| 7542 // Fall through when we need to inform the incremental marker. | 7547 // Fall through when we need to inform the incremental marker. |
| 7543 } | 7548 } |
| 7544 | 7549 |
| 7545 | 7550 |
| 7546 #undef __ | 7551 #undef __ |
| 7547 | 7552 |
| 7548 } } // namespace v8::internal | 7553 } } // namespace v8::internal |
| 7549 | 7554 |
| 7550 #endif // V8_TARGET_ARCH_MIPS | 7555 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |