diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-18 14:10:49 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-18 13:53:24 +0000 |
commit | 813fbf95af77a531c57a8c497345ad2c61d475b3 (patch) | |
tree | 821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/v8/src/compiler/frame-states.cc | |
parent | af6588f8d723931a298c995fa97259bb7f7deb55 (diff) | |
download | qtwebengine-chromium-813fbf95af77a531c57a8c497345ad2c61d475b3.tar.gz |
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/v8/src/compiler/frame-states.cc')
-rw-r--r-- | chromium/v8/src/compiler/frame-states.cc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/chromium/v8/src/compiler/frame-states.cc b/chromium/v8/src/compiler/frame-states.cc new file mode 100644 index 00000000000..d0dbfbb2be9 --- /dev/null +++ b/chromium/v8/src/compiler/frame-states.cc @@ -0,0 +1,53 @@ +// 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. + +#include "src/base/functional.h" +#include "src/compiler/frame-states.h" + +namespace v8 { +namespace internal { +namespace compiler { + +size_t hash_value(OutputFrameStateCombine const& sc) { + return base::hash_combine(sc.kind_, sc.parameter_); +} + + +std::ostream& operator<<(std::ostream& os, OutputFrameStateCombine const& sc) { + switch (sc.kind_) { + case OutputFrameStateCombine::kPushOutput: + if (sc.parameter_ == 0) return os << "Ignore"; + return os << "Push(" << sc.parameter_ << ")"; + case OutputFrameStateCombine::kPokeAt: + return os << "PokeAt(" << sc.parameter_ << ")"; + } + UNREACHABLE(); + return os; +} + + +bool operator==(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) { + return lhs.type() == rhs.type() && lhs.bailout_id() == rhs.bailout_id() && + lhs.state_combine() == rhs.state_combine(); +} + + +bool operator!=(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) { + return !(lhs == rhs); +} + + +size_t hash_value(FrameStateCallInfo const& info) { + return base::hash_combine(info.type(), info.bailout_id(), + info.state_combine()); +} + + +std::ostream& operator<<(std::ostream& os, FrameStateCallInfo const& info) { + return os << info.type() << ", " << info.bailout_id() << ", " + << info.state_combine(); +} +} +} +} |