Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1200)

Side by Side Diff: src/compiler/frame-states.cc

Issue 1131853002: [turbofan] Extract frame-states.h from common-operator.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/frame-states.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/base/functional.h"
6 #include "src/compiler/frame-states.h"
7
8 namespace v8 {
9 namespace internal {
10 namespace compiler {
11
12 size_t hash_value(OutputFrameStateCombine const& sc) {
13 return base::hash_combine(sc.kind_, sc.parameter_);
14 }
15
16
17 std::ostream& operator<<(std::ostream& os, OutputFrameStateCombine const& sc) {
18 switch (sc.kind_) {
19 case OutputFrameStateCombine::kPushOutput:
20 if (sc.parameter_ == 0) return os << "Ignore";
21 return os << "Push(" << sc.parameter_ << ")";
22 case OutputFrameStateCombine::kPokeAt:
23 return os << "PokeAt(" << sc.parameter_ << ")";
24 }
25 UNREACHABLE();
26 return os;
27 }
28
29
30 bool operator==(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) {
31 return lhs.type() == rhs.type() && lhs.bailout_id() == rhs.bailout_id() &&
32 lhs.state_combine() == rhs.state_combine();
33 }
34
35
36 bool operator!=(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) {
37 return !(lhs == rhs);
38 }
39
40
41 size_t hash_value(FrameStateCallInfo const& info) {
42 return base::hash_combine(info.type(), info.bailout_id(),
43 info.state_combine());
44 }
45
46
47 std::ostream& operator<<(std::ostream& os, FrameStateCallInfo const& info) {
48 return os << info.type() << ", " << info.bailout_id() << ", "
49 << info.state_combine();
50 }
51 }
52 }
53 }
OLDNEW
« no previous file with comments | « src/compiler/frame-states.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698