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

Unified Diff: src/compiler/node.cc

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add more tests. Created 6 years, 5 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/node.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index 260870fbe81c1ac7d9ac3bc30150e9dbd9d34c69..670c3afbdf364dc144750080396fb4e37bac5ef5 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -4,10 +4,25 @@
#include "src/compiler/node.h"
+#include "src/compiler/generic-node-inl.h"
+
namespace v8 {
namespace internal {
namespace compiler {
+void Node::CollectProjections(int projection_count, Node** projections) {
+ for (int i = 0; i < projection_count; ++i) projections[i] = NULL;
+ for (UseIter i = uses().begin(); i != uses().end(); ++i) {
+ if ((*i)->opcode() != IrOpcode::kProjection) continue;
+ int32_t index = OpParameter<int32_t>(*i);
+ ASSERT_GE(index, 0);
+ ASSERT_LT(index, projection_count);
+ ASSERT_EQ(NULL, projections[index]);
+ projections[index] = *i;
+ }
+}
+
+
OStream& operator<<(OStream& os, const Operator& op) { return op.PrintTo(os); }
@@ -23,6 +38,7 @@ OStream& operator<<(OStream& os, const Node& n) {
}
return os;
}
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698