OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 12341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12352 LOperand* op = range->CreateAssignedOperand(zone); | 12352 LOperand* op = range->CreateAssignedOperand(zone); |
12353 int assigned_reg = op->index(); | 12353 int assigned_reg = op->index(); |
12354 if (op->IsDoubleRegister()) { | 12354 if (op->IsDoubleRegister()) { |
12355 trace_.Add(" \"%s\"", | 12355 trace_.Add(" \"%s\"", |
12356 DoubleRegister::AllocationIndexToString(assigned_reg)); | 12356 DoubleRegister::AllocationIndexToString(assigned_reg)); |
12357 } else { | 12357 } else { |
12358 DCHECK(op->IsRegister()); | 12358 DCHECK(op->IsRegister()); |
12359 trace_.Add(" \"%s\"", Register::AllocationIndexToString(assigned_reg)); | 12359 trace_.Add(" \"%s\"", Register::AllocationIndexToString(assigned_reg)); |
12360 } | 12360 } |
12361 } else if (range->IsSpilled()) { | 12361 } else if (range->IsSpilled()) { |
12362 LOperand* op = range->TopLevel()->GetSpillOperand(); | 12362 int index = -1; |
12363 if (op->IsDoubleStackSlot()) { | 12363 if (range->TopLevel()->GetSpillRange()->id() != -1) { |
12364 trace_.Add(" \"double_stack:%d\"", op->index()); | 12364 index = range->TopLevel()->GetSpillRange()->id(); |
12365 } else { | 12365 } else { |
12366 DCHECK(op->IsStackSlot()); | 12366 index = range->TopLevel()->GetSpillOperand()->index(); |
12367 trace_.Add(" \"stack:%d\"", op->index()); | 12367 } |
| 12368 if (range->TopLevel()->Kind() == DOUBLE_REGISTERS) { |
| 12369 trace_.Add(" \"double_stack:%d\"", index); |
| 12370 } else { |
| 12371 DCHECK(range->TopLevel()->Kind() == GENERAL_REGISTERS); |
| 12372 trace_.Add(" \"stack:%d\"", index); |
12368 } | 12373 } |
12369 } | 12374 } |
12370 int parent_index = -1; | 12375 int parent_index = -1; |
12371 if (range->IsChild()) { | 12376 if (range->IsChild()) { |
12372 parent_index = range->parent()->id(); | 12377 parent_index = range->parent()->id(); |
12373 } else { | 12378 } else { |
12374 parent_index = range->id(); | 12379 parent_index = range->id(); |
12375 } | 12380 } |
12376 LOperand* op = range->FirstHint(); | 12381 LOperand* op = range->FirstHint(); |
12377 int hint_index = -1; | 12382 int hint_index = -1; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12488 if (ShouldProduceTraceOutput()) { | 12493 if (ShouldProduceTraceOutput()) { |
12489 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12494 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12490 } | 12495 } |
12491 | 12496 |
12492 #ifdef DEBUG | 12497 #ifdef DEBUG |
12493 graph_->Verify(false); // No full verify. | 12498 graph_->Verify(false); // No full verify. |
12494 #endif | 12499 #endif |
12495 } | 12500 } |
12496 | 12501 |
12497 } } // namespace v8::internal | 12502 } } // namespace v8::internal |
OLD | NEW |