| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 break; | 95 break; |
| 96 case CONSTANT_OPERAND: | 96 case CONSTANT_OPERAND: |
| 97 stream->Add("[constant:%d]", index()); | 97 stream->Add("[constant:%d]", index()); |
| 98 break; | 98 break; |
| 99 case STACK_SLOT: | 99 case STACK_SLOT: |
| 100 stream->Add("[stack:%d]", index()); | 100 stream->Add("[stack:%d]", index()); |
| 101 break; | 101 break; |
| 102 case DOUBLE_STACK_SLOT: | 102 case DOUBLE_STACK_SLOT: |
| 103 stream->Add("[double_stack:%d]", index()); | 103 stream->Add("[double_stack:%d]", index()); |
| 104 break; | 104 break; |
| 105 case FLOAT32x4_STACK_SLOT: |
| 106 stream->Add("[float32x4_stack:%d]", index()); |
| 107 break; |
| 108 case INT32x4_STACK_SLOT: |
| 109 stream->Add("[int32x4_stack:%d]", index()); |
| 110 break; |
| 105 case REGISTER: | 111 case REGISTER: |
| 106 stream->Add("[%s|R]", Register::AllocationIndexToString(index())); | 112 stream->Add("[%s|R]", Register::AllocationIndexToString(index())); |
| 107 break; | 113 break; |
| 108 case DOUBLE_REGISTER: | 114 case DOUBLE_REGISTER: |
| 109 stream->Add("[%s|R]", DoubleRegister::AllocationIndexToString(index())); | 115 stream->Add("[%s|R]", DoubleRegister::AllocationIndexToString(index())); |
| 110 break; | 116 break; |
| 117 case FLOAT32x4_REGISTER: |
| 118 stream->Add("[%s|R]", |
| 119 Float32x4Register::AllocationIndexToString(index())); |
| 120 break; |
| 121 case INT32x4_REGISTER: |
| 122 stream->Add("[%s|R]", |
| 123 Int32x4Register::AllocationIndexToString(index())); |
| 124 break; |
| 111 case ARGUMENT: | 125 case ARGUMENT: |
| 112 stream->Add("[arg:%d]", index()); | 126 stream->Add("[arg:%d]", index()); |
| 113 break; | 127 break; |
| 114 } | 128 } |
| 115 } | 129 } |
| 116 | 130 |
| 117 #define DEFINE_OPERAND_CACHE(name, type) \ | 131 #define DEFINE_OPERAND_CACHE(name, type) \ |
| 118 L##name* L##name::cache = NULL; \ | 132 L##name* L##name::cache = NULL; \ |
| 119 \ | 133 \ |
| 120 void L##name::SetUpCache() { \ | 134 void L##name::SetUpCache() { \ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 values_[i]->PrintTo(stream); | 204 values_[i]->PrintTo(stream); |
| 191 } | 205 } |
| 192 } | 206 } |
| 193 stream->Add("]"); | 207 stream->Add("]"); |
| 194 } | 208 } |
| 195 | 209 |
| 196 | 210 |
| 197 void LPointerMap::RecordPointer(LOperand* op, Zone* zone) { | 211 void LPointerMap::RecordPointer(LOperand* op, Zone* zone) { |
| 198 // Do not record arguments as pointers. | 212 // Do not record arguments as pointers. |
| 199 if (op->IsStackSlot() && op->index() < 0) return; | 213 if (op->IsStackSlot() && op->index() < 0) return; |
| 200 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot()); | 214 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot() && |
| 215 !op->IsFloat32x4Register() && !op->IsFloat32x4StackSlot() && |
| 216 !op->IsInt32x4Register() && !op->IsInt32x4StackSlot()); |
| 201 pointer_operands_.Add(op, zone); | 217 pointer_operands_.Add(op, zone); |
| 202 } | 218 } |
| 203 | 219 |
| 204 | 220 |
| 205 void LPointerMap::RemovePointer(LOperand* op) { | 221 void LPointerMap::RemovePointer(LOperand* op) { |
| 206 // Do not record arguments as pointers. | 222 // Do not record arguments as pointers. |
| 207 if (op->IsStackSlot() && op->index() < 0) return; | 223 if (op->IsStackSlot() && op->index() < 0) return; |
| 208 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot()); | 224 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot() && |
| 225 !op->IsFloat32x4Register() && !op->IsFloat32x4StackSlot() && |
| 226 !op->IsInt32x4Register() && !op->IsInt32x4StackSlot()); |
| 209 for (int i = 0; i < pointer_operands_.length(); ++i) { | 227 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 210 if (pointer_operands_[i]->Equals(op)) { | 228 if (pointer_operands_[i]->Equals(op)) { |
| 211 pointer_operands_.Remove(i); | 229 pointer_operands_.Remove(i); |
| 212 --i; | 230 --i; |
| 213 } | 231 } |
| 214 } | 232 } |
| 215 } | 233 } |
| 216 | 234 |
| 217 | 235 |
| 218 void LPointerMap::RecordUntagged(LOperand* op, Zone* zone) { | 236 void LPointerMap::RecordUntagged(LOperand* op, Zone* zone) { |
| 219 // Do not record arguments as pointers. | 237 // Do not record arguments as pointers. |
| 220 if (op->IsStackSlot() && op->index() < 0) return; | 238 if (op->IsStackSlot() && op->index() < 0) return; |
| 221 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot()); | 239 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot() && |
| 240 !op->IsFloat32x4Register() && !op->IsFloat32x4StackSlot() && |
| 241 !op->IsInt32x4Register() && !op->IsInt32x4StackSlot()); |
| 222 untagged_operands_.Add(op, zone); | 242 untagged_operands_.Add(op, zone); |
| 223 } | 243 } |
| 224 | 244 |
| 225 | 245 |
| 226 void LPointerMap::PrintTo(StringStream* stream) { | 246 void LPointerMap::PrintTo(StringStream* stream) { |
| 227 stream->Add("{"); | 247 stream->Add("{"); |
| 228 for (int i = 0; i < pointer_operands_.length(); ++i) { | 248 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 229 if (i != 0) stream->Add(";"); | 249 if (i != 0) stream->Add(";"); |
| 230 pointer_operands_[i]->PrintTo(stream); | 250 pointer_operands_[i]->PrintTo(stream); |
| 231 } | 251 } |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 492 |
| 473 | 493 |
| 474 LPhase::~LPhase() { | 494 LPhase::~LPhase() { |
| 475 if (ShouldProduceTraceOutput()) { | 495 if (ShouldProduceTraceOutput()) { |
| 476 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 496 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 477 } | 497 } |
| 478 } | 498 } |
| 479 | 499 |
| 480 | 500 |
| 481 } } // namespace v8::internal | 501 } } // namespace v8::internal |
| OLD | NEW |