Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 408 if (!locs->always_calls()) { | 408 if (!locs->always_calls()) { |
| 409 RegisterSet* regs = locs->live_registers(); | 409 RegisterSet* regs = locs->live_registers(); |
| 410 if (regs->fpu_regs_count() > 0) { | 410 if (regs->fpu_regs_count() > 0) { |
| 411 // Denote FPU registers with 0 bits in the stackmap. Based on the | 411 // Denote FPU registers with 0 bits in the stackmap. Based on the |
| 412 // assumption that there are normally few live FPU registers, this | 412 // assumption that there are normally few live FPU registers, this |
| 413 // encoding is simpler and roughly as compact as storing a separate | 413 // encoding is simpler and roughly as compact as storing a separate |
| 414 // count of FPU registers. | 414 // count of FPU registers. |
| 415 // | 415 // |
| 416 // FPU registers have the highest register number at the highest | 416 // FPU registers have the highest register number at the highest |
| 417 // address (i.e., first in the stackmap). | 417 // address (i.e., first in the stackmap). |
| 418 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize; | 418 const intptr_t kFpuRegisterSpillFactor = |
|
Vyacheslav Egorov (Google)
2013/04/03 14:25:45
you can kill this variable. it serves no purpose n
Cutch
2013/04/04 22:24:06
It makes the for loop on line 423 easier to read a
| |
| 419 FlowGraphAllocator::kFpuRegisterSpillFactor; | |
| 419 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { | 420 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { |
| 420 FpuRegister reg = static_cast<FpuRegister>(i); | 421 FpuRegister reg = static_cast<FpuRegister>(i); |
| 421 if (regs->ContainsFpuRegister(reg)) { | 422 if (regs->ContainsFpuRegister(reg)) { |
| 422 for (intptr_t j = 0; j < kFpuRegisterSpillFactor; ++j) { | 423 for (intptr_t j = 0; j < kFpuRegisterSpillFactor; ++j) { |
| 423 bitmap->Set(bitmap->Length(), false); | 424 bitmap->Set(bitmap->Length(), false); |
| 424 } | 425 } |
| 425 } | 426 } |
| 426 } | 427 } |
| 427 } | 428 } |
| 428 // General purpose registers have the lowest register number at the | 429 // General purpose registers have the lowest register number at the |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1036 if (i != largest_ix) { | 1037 if (i != largest_ix) { |
| 1037 // Swap. | 1038 // Swap. |
| 1038 CidTarget temp = (*sorted)[i]; | 1039 CidTarget temp = (*sorted)[i]; |
| 1039 (*sorted)[i] = (*sorted)[largest_ix]; | 1040 (*sorted)[i] = (*sorted)[largest_ix]; |
| 1040 (*sorted)[largest_ix] = temp; | 1041 (*sorted)[largest_ix] = temp; |
| 1041 } | 1042 } |
| 1042 } | 1043 } |
| 1043 } | 1044 } |
| 1044 | 1045 |
| 1045 } // namespace dart | 1046 } // namespace dart |
| OLD | NEW |