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

Unified Diff: src/compiler/frame-states.cc

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/frame-states.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/frame-states.cc
diff --git a/src/compiler/frame-states.cc b/src/compiler/frame-states.cc
index 80876f6b2a9233f103645a69c2976ffeb8126b08..76d6749d0f88788cf17e1fca67ffe8fb9d65461f 100644
--- a/src/compiler/frame-states.cc
+++ b/src/compiler/frame-states.cc
@@ -27,24 +27,38 @@ std::ostream& operator<<(std::ostream& os, OutputFrameStateCombine const& sc) {
}
-bool operator==(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) {
+bool operator==(FrameStateInfo const& lhs, FrameStateInfo const& rhs) {
return lhs.type() == rhs.type() && lhs.bailout_id() == rhs.bailout_id() &&
- lhs.state_combine() == rhs.state_combine();
+ lhs.state_combine() == rhs.state_combine() &&
+ lhs.function_info() == rhs.function_info();
}
-bool operator!=(FrameStateCallInfo const& lhs, FrameStateCallInfo const& rhs) {
+bool operator!=(FrameStateInfo const& lhs, FrameStateInfo const& rhs) {
return !(lhs == rhs);
}
-size_t hash_value(FrameStateCallInfo const& info) {
- return base::hash_combine(info.type(), info.bailout_id(),
+size_t hash_value(FrameStateInfo const& info) {
+ return base::hash_combine(static_cast<int>(info.type()), info.bailout_id(),
info.state_combine());
}
-std::ostream& operator<<(std::ostream& os, FrameStateCallInfo const& info) {
+std::ostream& operator<<(std::ostream& os, FrameStateType type) {
+ switch (type) {
+ case FrameStateType::kJavaScriptFunction:
+ os << "JS_FRAME";
+ break;
+ case FrameStateType::kArgumentsAdaptor:
+ os << "ARGUMENTS_ADAPTOR";
+ break;
+ }
+ return os;
+}
+
+
+std::ostream& operator<<(std::ostream& os, FrameStateInfo const& info) {
os << info.type() << ", " << info.bailout_id() << ", "
<< info.state_combine();
Handle<SharedFunctionInfo> shared_info;
« no previous file with comments | « src/compiler/frame-states.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698