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