| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) { | 365 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) { |
| 366 return LConstantOperand::Create(constant->id(), zone()); | 366 return LConstantOperand::Create(constant->id(), zone()); |
| 367 } | 367 } |
| 368 | 368 |
| 369 | 369 |
| 370 int LChunk::GetParameterStackSlot(int index) const { | 370 int LChunk::GetParameterStackSlot(int index) const { |
| 371 // The receiver is at index 0, the first parameter at index 1, so we | 371 // The receiver is at index 0, the first parameter at index 1, so we |
| 372 // shift all parameter indexes down by the number of parameters, and | 372 // shift all parameter indexes down by the number of parameters, and |
| 373 // make sure they end up negative so they are distinguishable from | 373 // make sure they end up negative so they are distinguishable from |
| 374 // spill slots. | 374 // spill slots. |
| 375 int result = index - info()->scope()->num_parameters() - 1; | 375 int result = index - info()->num_parameters() - 1; |
| 376 |
| 376 ASSERT(result < 0); | 377 ASSERT(result < 0); |
| 377 return result; | 378 return result; |
| 378 } | 379 } |
| 379 | 380 |
| 380 | 381 |
| 381 // A parameter relative to ebp in the arguments stub. | 382 // A parameter relative to ebp in the arguments stub. |
| 382 int LChunk::ParameterAt(int index) { | 383 int LChunk::ParameterAt(int index) { |
| 383 ASSERT(-1 <= index); // -1 is the receiver. | 384 ASSERT(-1 <= index); // -1 is the receiver. |
| 384 return (1 + info()->scope()->num_parameters() - index) * | 385 return (1 + info()->scope()->num_parameters() - index) * |
| 385 kPointerSize; | 386 kPointerSize; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 | 492 |
| 492 | 493 |
| 493 LPhase::~LPhase() { | 494 LPhase::~LPhase() { |
| 494 if (ShouldProduceTraceOutput()) { | 495 if (ShouldProduceTraceOutput()) { |
| 495 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 496 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 496 } | 497 } |
| 497 } | 498 } |
| 498 | 499 |
| 499 | 500 |
| 500 } } // namespace v8::internal | 501 } } // namespace v8::internal |
| OLD | NEW |