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

Unified Diff: src/compiler/common-operator.h

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 2 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/code-generator.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index c5a8d7ee691a40e5f54c7b5960237521dfe169f0..31c3d129e2257a8b553a6955e1a09333b1d99246 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -23,6 +23,16 @@ struct CommonOperatorBuilderImpl;
class Operator;
+// Prediction hint for branches.
+enum class BranchHint : uint8_t { kNone, kTrue, kFalse };
+
+inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); }
+
+std::ostream& operator<<(std::ostream&, BranchHint);
+
+BranchHint BranchHintOf(const Operator* const);
+
+
// Flag that describes how to combine the current environment with
// the output of a node to obtain a framestate for lazy bailout.
class OutputFrameStateCombine {
@@ -57,6 +67,10 @@ class OutputFrameStateCombine {
return kind_ == kPushOutput && parameter_ == 0;
}
+ size_t ConsumedOutputCount() const {
+ return kind_ == kPushOutput ? GetPushCount() : 1;
+ }
+
bool operator==(OutputFrameStateCombine const& other) const {
return kind_ == other.kind_ && parameter_ == other.parameter_;
}
@@ -117,16 +131,17 @@ std::ostream& operator<<(std::ostream&, FrameStateCallInfo const&);
// Interface for building common operators that can be used at any level of IR,
// including JavaScript, mid-level, and low-level.
-class CommonOperatorBuilder FINAL {
+class CommonOperatorBuilder FINAL : public ZoneObject {
public:
explicit CommonOperatorBuilder(Zone* zone);
const Operator* Dead();
const Operator* End();
- const Operator* Branch();
+ const Operator* Branch(BranchHint = BranchHint::kNone);
const Operator* IfTrue();
const Operator* IfFalse();
const Operator* Throw();
+ const Operator* Terminate(int effects);
const Operator* Return();
const Operator* Start(int num_formal_parameters);
@@ -159,6 +174,8 @@ class CommonOperatorBuilder FINAL {
const CommonOperatorBuilderImpl& impl_;
Zone* const zone_;
+
+ DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
};
} // namespace compiler
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698