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

Unified Diff: src/code-stub-assembler.h

Issue 2556123002: [turbofan] Further adapting machine graph verifier to code stubs. (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 71647eb10be65d7473b22e4395fa0a951c5d0df2..95fcc1c3afddb8e19178a7d460379725bc8cf840 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -94,6 +94,28 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
return value;
}
+#define PARAMETER_BINARY_OPERATION(OpName, IntPtrOpName, SmiOpName, \
+ Int32OpName) \
+ Node* OpName(Node* value1, Node* value2, ParameterMode mode) { \
+ if (mode == SMI_PARAMETERS) { \
+ return SmiOpName(value1, value2); \
+ } else if (mode == INTPTR_PARAMETERS) { \
+ return IntPtrOpName(value1, value2); \
+ } else { \
+ DCHECK_EQ(INTEGER_PARAMETERS, mode); \
+ return Int32OpName(value1, value2); \
+ } \
+ }
+ PARAMETER_BINARY_OPERATION(IntPtrOrSmiAdd, IntPtrAdd, SmiAdd, Int32Add)
+ PARAMETER_BINARY_OPERATION(IntPtrOrSmiLessThan, IntPtrLessThan, SmiLessThan,
+ Int32LessThan)
+ PARAMETER_BINARY_OPERATION(IntPtrOrSmiGreaterThan, IntPtrGreaterThan,
+ SmiGreaterThan, Int32GreaterThan)
+ PARAMETER_BINARY_OPERATION(UintPtrOrSmiLessThan, UintPtrLessThan, SmiBelow,
+ Uint32LessThan)
+
+#undef PARAMETER_BINARY_OPERATION
+
Node* NoContextConstant();
#define HEAP_CONSTANT_ACCESSOR(rootName, name) Node* name##Constant();
HEAP_CONSTANT_LIST(HEAP_CONSTANT_ACCESSOR)
@@ -142,6 +164,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* SmiBelow(Node* a, Node* b);
Node* SmiLessThan(Node* a, Node* b);
Node* SmiLessThanOrEqual(Node* a, Node* b);
+ Node* SmiGreaterThan(Node* a, Node* b);
Node* SmiMax(Node* a, Node* b);
Node* SmiMin(Node* a, Node* b);
// Computes a % b for Smi inputs a and b; result is not necessarily a Smi.
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698