diff options
Diffstat (limited to 'deps/v8/src/compiler/live-range-separator.h')
-rw-r--r-- | deps/v8/src/compiler/live-range-separator.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/live-range-separator.h b/deps/v8/src/compiler/live-range-separator.h new file mode 100644 index 0000000000..c8e6edc20b --- /dev/null +++ b/deps/v8/src/compiler/live-range-separator.h @@ -0,0 +1,60 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_LIVE_RANGE_SEPARATOR_H_ +#define V8_LIVE_RANGE_SEPARATOR_H_ + + +#include <src/zone.h> +namespace v8 { +namespace internal { + +class Zone; + +namespace compiler { + +class RegisterAllocationData; + + +// A register allocation pair of transformations: splinter and merge live ranges +class LiveRangeSeparator final : public ZoneObject { + public: + LiveRangeSeparator(RegisterAllocationData* data, Zone* zone) + : data_(data), zone_(zone) {} + + void Splinter(); + + private: + RegisterAllocationData* data() const { return data_; } + Zone* zone() const { return zone_; } + + RegisterAllocationData* const data_; + Zone* const zone_; + + DISALLOW_COPY_AND_ASSIGN(LiveRangeSeparator); +}; + + +class LiveRangeMerger final : public ZoneObject { + public: + LiveRangeMerger(RegisterAllocationData* data, Zone* zone) + : data_(data), zone_(zone) {} + + void Merge(); + + private: + RegisterAllocationData* data() const { return data_; } + Zone* zone() const { return zone_; } + + RegisterAllocationData* const data_; + Zone* const zone_; + + DISALLOW_COPY_AND_ASSIGN(LiveRangeMerger); +}; + + +} // namespace compiler +} // namespace internal +} // namespace v8 +#endif // V8_LIVE_RANGE_SEPARATOR_H_ |