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

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

Issue 2383473003: [stubs] Add more helper methods for heap constants (Closed)
Patch Set: rebasing onto master Created 4 years, 3 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 | « 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 5f42d2920eab6b905604a5f8e8469559405b82cf..42efc506d3f20cc34f4c65ef3d311f34f14ac65c 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -25,6 +25,19 @@ enum class UnicodeEncoding {
UTF32, // full UTF32 code unit / Unicode codepoint
};
+#define HEAP_CONSTANT_LIST(V) \
+ V(BooleanMap, BooleanMap) \
+ V(empty_string, EmptyString) \
+ V(FixedArrayMap, FixedArrayMap) \
+ V(FixedCOWArrayMap, FixedCOWArrayMap) \
+ V(FixedDoubleArrayMap, FixedDoubleArrayMap) \
+ V(HeapNumberMap, HeapNumberMap) \
+ V(MinusZeroValue, MinusZero) \
+ V(NanValue, Nan) \
+ V(NullValue, Null) \
+ V(TheHoleValue, TheHole) \
+ V(UndefinedValue, Undefined)
+
// Provides JavaScript-specific "macro-assembler" functionality on top of the
// CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
// it's possible to add JavaScript-specific useful CodeAssembler "macros"
@@ -76,18 +89,16 @@ class CodeStubAssembler : public compiler::CodeAssembler {
return value;
}
- compiler::Node* BooleanMapConstant();
- compiler::Node* EmptyStringConstant();
- compiler::Node* FixedArrayMapConstant();
- compiler::Node* FixedCowArrayMapConstant();
- compiler::Node* FixedDoubleArrayMapConstant();
- compiler::Node* HeapNumberMapConstant();
compiler::Node* NoContextConstant();
- compiler::Node* NanConstant();
- compiler::Node* NullConstant();
- compiler::Node* MinusZeroConstant();
- compiler::Node* UndefinedConstant();
- compiler::Node* TheHoleConstant();
+#define HEAP_CONSTANT_ACCESSOR(rootName, name) compiler::Node* name##Constant();
+ HEAP_CONSTANT_LIST(HEAP_CONSTANT_ACCESSOR)
+#undef HEAP_CONSTANT_ACCESSOR
+
+#define HEAP_CONSTANT_TEST(rootName, name) \
+ compiler::Node* Is##name(compiler::Node* value);
+ HEAP_CONSTANT_LIST(HEAP_CONSTANT_TEST)
+#undef HEAP_CONSTANT_TEST
+
compiler::Node* HashSeed();
compiler::Node* StaleRegisterConstant();
« 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