OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 int parameter_count, | 447 int parameter_count, |
448 int argument_count, | 448 int argument_count, |
449 int value_count, | 449 int value_count, |
450 LEnvironment* outer) | 450 LEnvironment* outer) |
451 : closure_(closure), | 451 : closure_(closure), |
452 arguments_stack_height_(argument_count), | 452 arguments_stack_height_(argument_count), |
453 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), | 453 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), |
454 translation_index_(-1), | 454 translation_index_(-1), |
455 ast_id_(ast_id), | 455 ast_id_(ast_id), |
456 parameter_count_(parameter_count), | 456 parameter_count_(parameter_count), |
| 457 pc_offset_(-1), |
457 values_(value_count), | 458 values_(value_count), |
458 representations_(value_count), | 459 representations_(value_count), |
459 spilled_registers_(NULL), | 460 spilled_registers_(NULL), |
460 spilled_double_registers_(NULL), | 461 spilled_double_registers_(NULL), |
461 outer_(outer) { | 462 outer_(outer) { |
462 } | 463 } |
463 | 464 |
464 Handle<JSFunction> closure() const { return closure_; } | 465 Handle<JSFunction> closure() const { return closure_; } |
465 int arguments_stack_height() const { return arguments_stack_height_; } | 466 int arguments_stack_height() const { return arguments_stack_height_; } |
466 int deoptimization_index() const { return deoptimization_index_; } | 467 int deoptimization_index() const { return deoptimization_index_; } |
467 int translation_index() const { return translation_index_; } | 468 int translation_index() const { return translation_index_; } |
468 int ast_id() const { return ast_id_; } | 469 int ast_id() const { return ast_id_; } |
469 int parameter_count() const { return parameter_count_; } | 470 int parameter_count() const { return parameter_count_; } |
| 471 int pc_offset() const { return pc_offset_; } |
470 LOperand** spilled_registers() const { return spilled_registers_; } | 472 LOperand** spilled_registers() const { return spilled_registers_; } |
471 LOperand** spilled_double_registers() const { | 473 LOperand** spilled_double_registers() const { |
472 return spilled_double_registers_; | 474 return spilled_double_registers_; |
473 } | 475 } |
474 const ZoneList<LOperand*>* values() const { return &values_; } | 476 const ZoneList<LOperand*>* values() const { return &values_; } |
475 LEnvironment* outer() const { return outer_; } | 477 LEnvironment* outer() const { return outer_; } |
476 | 478 |
477 void AddValue(LOperand* operand, Representation representation) { | 479 void AddValue(LOperand* operand, Representation representation) { |
478 values_.Add(operand); | 480 values_.Add(operand); |
479 representations_.Add(representation); | 481 representations_.Add(representation); |
480 } | 482 } |
481 | 483 |
482 bool HasTaggedValueAt(int index) const { | 484 bool HasTaggedValueAt(int index) const { |
483 return representations_[index].IsTagged(); | 485 return representations_[index].IsTagged(); |
484 } | 486 } |
485 | 487 |
486 void Register(int deoptimization_index, int translation_index) { | 488 void Register(int deoptimization_index, |
| 489 int translation_index, |
| 490 int pc_offset) { |
487 ASSERT(!HasBeenRegistered()); | 491 ASSERT(!HasBeenRegistered()); |
488 deoptimization_index_ = deoptimization_index; | 492 deoptimization_index_ = deoptimization_index; |
489 translation_index_ = translation_index; | 493 translation_index_ = translation_index; |
| 494 pc_offset_ = pc_offset; |
490 } | 495 } |
491 bool HasBeenRegistered() const { | 496 bool HasBeenRegistered() const { |
492 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; | 497 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; |
493 } | 498 } |
494 | 499 |
495 void SetSpilledRegisters(LOperand** registers, | 500 void SetSpilledRegisters(LOperand** registers, |
496 LOperand** double_registers) { | 501 LOperand** double_registers) { |
497 spilled_registers_ = registers; | 502 spilled_registers_ = registers; |
498 spilled_double_registers_ = double_registers; | 503 spilled_double_registers_ = double_registers; |
499 } | 504 } |
500 | 505 |
501 void PrintTo(StringStream* stream); | 506 void PrintTo(StringStream* stream); |
502 | 507 |
503 private: | 508 private: |
504 Handle<JSFunction> closure_; | 509 Handle<JSFunction> closure_; |
505 int arguments_stack_height_; | 510 int arguments_stack_height_; |
506 int deoptimization_index_; | 511 int deoptimization_index_; |
507 int translation_index_; | 512 int translation_index_; |
508 int ast_id_; | 513 int ast_id_; |
509 int parameter_count_; | 514 int parameter_count_; |
| 515 int pc_offset_; |
510 ZoneList<LOperand*> values_; | 516 ZoneList<LOperand*> values_; |
511 ZoneList<Representation> representations_; | 517 ZoneList<Representation> representations_; |
512 | 518 |
513 // Allocation index indexed arrays of spill slot operands for registers | 519 // Allocation index indexed arrays of spill slot operands for registers |
514 // that are also in spill slots at an OSR entry. NULL for environments | 520 // that are also in spill slots at an OSR entry. NULL for environments |
515 // that do not correspond to an OSR entry. | 521 // that do not correspond to an OSR entry. |
516 LOperand** spilled_registers_; | 522 LOperand** spilled_registers_; |
517 LOperand** spilled_double_registers_; | 523 LOperand** spilled_double_registers_; |
518 | 524 |
519 LEnvironment* outer_; | 525 LEnvironment* outer_; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 ShallowIterator current_iterator_; | 601 ShallowIterator current_iterator_; |
596 }; | 602 }; |
597 | 603 |
598 | 604 |
599 int ElementsKindToShiftSize(ElementsKind elements_kind); | 605 int ElementsKindToShiftSize(ElementsKind elements_kind); |
600 | 606 |
601 | 607 |
602 } } // namespace v8::internal | 608 } } // namespace v8::internal |
603 | 609 |
604 #endif // V8_LITHIUM_H_ | 610 #endif // V8_LITHIUM_H_ |
OLD | NEW |