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()->num_parameters() - 1; | 375 int result = index - info()->scope()->num_parameters() - 1; |
376 | |
377 ASSERT(result < 0); | 376 ASSERT(result < 0); |
378 return result; | 377 return result; |
379 } | 378 } |
380 | 379 |
381 | 380 |
382 // A parameter relative to ebp in the arguments stub. | 381 // A parameter relative to ebp in the arguments stub. |
383 int LChunk::ParameterAt(int index) { | 382 int LChunk::ParameterAt(int index) { |
384 ASSERT(-1 <= index); // -1 is the receiver. | 383 ASSERT(-1 <= index); // -1 is the receiver. |
385 return (1 + info()->scope()->num_parameters() - index) * | 384 return (1 + info()->scope()->num_parameters() - index) * |
386 kPointerSize; | 385 kPointerSize; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 500 |
502 | 501 |
503 LPhase::~LPhase() { | 502 LPhase::~LPhase() { |
504 if (ShouldProduceTraceOutput()) { | 503 if (ShouldProduceTraceOutput()) { |
505 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 504 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
506 } | 505 } |
507 } | 506 } |
508 | 507 |
509 | 508 |
510 } } // namespace v8::internal | 509 } } // namespace v8::internal |
OLD | NEW |