| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_LOCATIONS_H_ | 5 #ifndef VM_LOCATIONS_H_ |
| 6 #define VM_LOCATIONS_H_ | 6 #define VM_LOCATIONS_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bitfield.h" | 10 #include "vm/bitfield.h" |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 // Specification of locations for inputs and output. | 542 // Specification of locations for inputs and output. |
| 543 class LocationSummary : public ZoneAllocated { | 543 class LocationSummary : public ZoneAllocated { |
| 544 public: | 544 public: |
| 545 enum ContainsCall { | 545 enum ContainsCall { |
| 546 kNoCall, | 546 kNoCall, |
| 547 kCall, | 547 kCall, |
| 548 kCallOnSlowPath | 548 kCallOnSlowPath |
| 549 }; | 549 }; |
| 550 | 550 |
| 551 LocationSummary(Isolate* isolate, | 551 LocationSummary(Zone* zone, |
| 552 intptr_t input_count, | 552 intptr_t input_count, |
| 553 intptr_t temp_count, | 553 intptr_t temp_count, |
| 554 LocationSummary::ContainsCall contains_call); | 554 LocationSummary::ContainsCall contains_call); |
| 555 | 555 |
| 556 intptr_t input_count() const { | 556 intptr_t input_count() const { |
| 557 return num_inputs_; | 557 return num_inputs_; |
| 558 } | 558 } |
| 559 | 559 |
| 560 Location in(intptr_t index) const { | 560 Location in(intptr_t index) const { |
| 561 ASSERT(index >= 0); | 561 ASSERT(index >= 0); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 bool can_call() { | 638 bool can_call() { |
| 639 return contains_call_ != kNoCall; | 639 return contains_call_ != kNoCall; |
| 640 } | 640 } |
| 641 | 641 |
| 642 bool HasCallOnSlowPath() { | 642 bool HasCallOnSlowPath() { |
| 643 return can_call() && !always_calls(); | 643 return can_call() && !always_calls(); |
| 644 } | 644 } |
| 645 | 645 |
| 646 void PrintTo(BufferFormatter* f) const; | 646 void PrintTo(BufferFormatter* f) const; |
| 647 | 647 |
| 648 static LocationSummary* Make(Isolate* isolate, | 648 static LocationSummary* Make(Zone* zone, |
| 649 intptr_t input_count, | 649 intptr_t input_count, |
| 650 Location out, | 650 Location out, |
| 651 ContainsCall contains_call); | 651 ContainsCall contains_call); |
| 652 | 652 |
| 653 RegisterSet* live_registers() { | 653 RegisterSet* live_registers() { |
| 654 return &live_registers_; | 654 return &live_registers_; |
| 655 } | 655 } |
| 656 | 656 |
| 657 #if defined(DEBUG) | 657 #if defined(DEBUG) |
| 658 // Debug only verification that ensures that writable registers are correctly | 658 // Debug only verification that ensures that writable registers are correctly |
| (...skipping 16 matching lines...) Expand all Loading... |
| 675 | 675 |
| 676 #if defined(DEBUG) | 676 #if defined(DEBUG) |
| 677 intptr_t writable_inputs_; | 677 intptr_t writable_inputs_; |
| 678 #endif | 678 #endif |
| 679 }; | 679 }; |
| 680 | 680 |
| 681 | 681 |
| 682 } // namespace dart | 682 } // namespace dart |
| 683 | 683 |
| 684 #endif // VM_LOCATIONS_H_ | 684 #endif // VM_LOCATIONS_H_ |
| OLD | NEW |