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

Unified Diff: src/compiler/operator-properties-inl.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/opcodes.h ('k') | src/compiler/pipeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/operator-properties-inl.h
diff --git a/src/compiler/operator-properties-inl.h b/src/compiler/operator-properties-inl.h
index 2ddaeca145c8163f3232cdbcd8c4408807b2ed55..7c2ae1635ffeffb8d422ded1fa05a2fffb494a29 100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -81,6 +81,9 @@ inline bool OperatorProperties::HasFrameStateInput(const Operator* op) {
case IrOpcode::kJSStoreProperty:
case IrOpcode::kJSSubtract:
+ // Conversions
+ case IrOpcode::kJSToObject:
+
// Other
case IrOpcode::kJSDeleteProperty:
return true;
@@ -104,7 +107,8 @@ inline int OperatorProperties::GetFrameStateInputCount(const Operator* op) {
inline int OperatorProperties::GetEffectInputCount(const Operator* op) {
if (op->opcode() == IrOpcode::kEffectPhi ||
- op->opcode() == IrOpcode::kFinish) {
+ op->opcode() == IrOpcode::kFinish ||
+ op->opcode() == IrOpcode::kTerminate) {
return OpParameter<int>(op);
}
if (op->HasProperty(Operator::kNoRead) && op->HasProperty(Operator::kNoWrite))
@@ -113,6 +117,7 @@ inline int OperatorProperties::GetEffectInputCount(const Operator* op) {
}
inline int OperatorProperties::GetControlInputCount(const Operator* op) {
+ // TODO(titzer): fix this mess; just make them a count on the operator.
switch (op->opcode()) {
case IrOpcode::kPhi:
case IrOpcode::kEffectPhi:
@@ -123,6 +128,8 @@ inline int OperatorProperties::GetControlInputCount(const Operator* op) {
#define OPCODE_CASE(x) case IrOpcode::k##x:
CONTROL_OP_LIST(OPCODE_CASE)
#undef OPCODE_CASE
+ if (op->opcode() == IrOpcode::kBranch) return 1;
+ if (op->opcode() == IrOpcode::kTerminate) return 1;
// Control operators are Operator1<int>.
return OpParameter<int>(op);
default:
@@ -152,7 +159,8 @@ inline bool OperatorProperties::HasValueOutput(const Operator* op) {
inline bool OperatorProperties::HasEffectOutput(const Operator* op) {
return op->opcode() == IrOpcode::kStart ||
op->opcode() == IrOpcode::kValueEffect ||
- (op->opcode() != IrOpcode::kFinish && GetEffectInputCount(op) > 0);
+ (op->opcode() != IrOpcode::kFinish &&
+ op->opcode() != IrOpcode::kTerminate && GetEffectInputCount(op) > 0);
}
inline bool OperatorProperties::HasControlOutput(const Operator* op) {
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698