| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 void LPointerMap::PrintTo(StringStream* stream) { | 226 void LPointerMap::PrintTo(StringStream* stream) { |
| 227 stream->Add("{"); | 227 stream->Add("{"); |
| 228 for (int i = 0; i < pointer_operands_.length(); ++i) { | 228 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 229 if (i != 0) stream->Add(";"); | 229 if (i != 0) stream->Add(";"); |
| 230 pointer_operands_[i]->PrintTo(stream); | 230 pointer_operands_[i]->PrintTo(stream); |
| 231 } | 231 } |
| 232 stream->Add("}"); | 232 stream->Add("}"); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 int ElementsKindToShiftSize(ElementsKind elements_kind) { | |
| 237 switch (elements_kind) { | |
| 238 case EXTERNAL_BYTE_ELEMENTS: | |
| 239 case EXTERNAL_PIXEL_ELEMENTS: | |
| 240 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | |
| 241 return 0; | |
| 242 case EXTERNAL_SHORT_ELEMENTS: | |
| 243 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | |
| 244 return 1; | |
| 245 case EXTERNAL_INT_ELEMENTS: | |
| 246 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | |
| 247 case EXTERNAL_FLOAT_ELEMENTS: | |
| 248 return 2; | |
| 249 case EXTERNAL_DOUBLE_ELEMENTS: | |
| 250 case FAST_DOUBLE_ELEMENTS: | |
| 251 case FAST_HOLEY_DOUBLE_ELEMENTS: | |
| 252 return 3; | |
| 253 case FAST_SMI_ELEMENTS: | |
| 254 case FAST_ELEMENTS: | |
| 255 case FAST_HOLEY_SMI_ELEMENTS: | |
| 256 case FAST_HOLEY_ELEMENTS: | |
| 257 case DICTIONARY_ELEMENTS: | |
| 258 case NON_STRICT_ARGUMENTS_ELEMENTS: | |
| 259 return kPointerSizeLog2; | |
| 260 } | |
| 261 UNREACHABLE(); | |
| 262 return 0; | |
| 263 } | |
| 264 | |
| 265 | |
| 266 int StackSlotOffset(int index) { | 236 int StackSlotOffset(int index) { |
| 267 if (index >= 0) { | 237 if (index >= 0) { |
| 268 // Local or spill slot. Skip the frame pointer, function, and | 238 // Local or spill slot. Skip the frame pointer, function, and |
| 269 // context in the fixed part of the frame. | 239 // context in the fixed part of the frame. |
| 270 return -(index + 3) * kPointerSize; | 240 return -(index + 3) * kPointerSize; |
| 271 } else { | 241 } else { |
| 272 // Incoming parameter. Skip the return address. | 242 // Incoming parameter. Skip the return address. |
| 273 return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize; | 243 return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize; |
| 274 } | 244 } |
| 275 } | 245 } |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 471 |
| 502 | 472 |
| 503 LPhase::~LPhase() { | 473 LPhase::~LPhase() { |
| 504 if (ShouldProduceTraceOutput()) { | 474 if (ShouldProduceTraceOutput()) { |
| 505 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 475 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 506 } | 476 } |
| 507 } | 477 } |
| 508 | 478 |
| 509 | 479 |
| 510 } } // namespace v8::internal | 480 } } // namespace v8::internal |
| OLD | NEW |