Chromium Code Reviews| 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1068 if (initial_capacity <= kLoopUnfoldLimit) { | 1068 if (initial_capacity <= kLoopUnfoldLimit) { |
| 1069 // Use a scratch register here to have only one reloc info when unfolding | 1069 // Use a scratch register here to have only one reloc info when unfolding |
| 1070 // the loop. | 1070 // the loop. |
| 1071 for (int i = 0; i < initial_capacity; i++) { | 1071 for (int i = 0; i < initial_capacity; i++) { |
| 1072 __ movq(FieldOperand(scratch1, | 1072 __ movq(FieldOperand(scratch1, |
| 1073 FixedArray::kHeaderSize + i * kPointerSize), | 1073 FixedArray::kHeaderSize + i * kPointerSize), |
| 1074 scratch3); | 1074 scratch3); |
| 1075 } | 1075 } |
| 1076 } else { | 1076 } else { |
| 1077 Label loop, entry; | 1077 Label loop, entry; |
| 1078 __ addq(scratch1, Immediate(FixedArray::kHeaderSize - kHeapObjectTag)); | |
|
Kevin Millikin (Chromium)
2011/10/27 10:35:54
No need to untag here. Could use a counted loop s
| |
| 1078 __ jmp(&entry); | 1079 __ jmp(&entry); |
| 1079 __ bind(&loop); | 1080 __ bind(&loop); |
| 1080 __ movq(Operand(scratch1, 0), scratch3); | 1081 __ movq(Operand(scratch1, 0), scratch3); |
| 1081 __ addq(scratch1, Immediate(kPointerSize)); | 1082 __ addq(scratch1, Immediate(kPointerSize)); |
| 1082 __ bind(&entry); | 1083 __ bind(&entry); |
| 1083 __ cmpq(scratch1, scratch2); | 1084 __ cmpq(scratch1, scratch2); |
| 1084 __ j(below, &loop); | 1085 __ j(below, &loop); |
| 1085 } | 1086 } |
| 1086 } | 1087 } |
| 1087 | 1088 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1569 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1570 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
| 1570 generator.Generate(); | 1571 generator.Generate(); |
| 1571 } | 1572 } |
| 1572 | 1573 |
| 1573 | 1574 |
| 1574 #undef __ | 1575 #undef __ |
| 1575 | 1576 |
| 1576 } } // namespace v8::internal | 1577 } } // namespace v8::internal |
| 1577 | 1578 |
| 1578 #endif // V8_TARGET_ARCH_X64 | 1579 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |