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

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

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: git rid of stuff that snuck into patch 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
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 01c74c8e059a303f58cd247f39c516d5508081b8..d6bff64d1aa077b29fc3d0699e9b9e03269b6052 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -28,6 +28,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
V(CodeMap, CodeMap) \
V(empty_string, EmptyString) \
V(EmptyFixedArray, EmptyFixedArray) \
+ V(EmptyLiteralsArray, EmptyLiteralsArray) \
V(FalseValue, False) \
V(FixedArrayMap, FixedArrayMap) \
V(FixedCOWArrayMap, FixedCOWArrayMap) \
@@ -1204,8 +1205,22 @@ class CodeStubArguments {
#ifdef DEBUG
#define CSA_ASSERT(csa, x) \
(csa)->Assert([&] { return (x); }, #x, __FILE__, __LINE__)
+#define CSA_ASSERT_JS_ARGC_OP(csa, Op, op, expected) \
+ (csa)->Assert( \
+ [&] { \
+ const CodeAssemblerState* state = (csa)->state(); \
+ int argc_index = state->parameter_count() - 2; \
Igor Sheludko 2016/12/27 14:14:02 Please add a comment: // See Linkage::GetJSCallD
caitp 2017/01/02 15:51:12 Done.
+ compiler::Node* const argc = (csa)->Parameter(argc_index); \
+ return (csa)->Op(argc, (csa)->Int32Constant(expected)); \
+ }, \
+ "argc " #op " " #expected, __FILE__, __LINE__)
+
+#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) \
+ CSA_ASSERT_JS_ARGC_OP(csa, Word32Equal, ==, expected)
+
#else
#define CSA_ASSERT(csa, x) ((void)0)
+#define CSA_ASSERT_JS_ARGC_EQ(csa, expected) ((void)0)
#endif
#ifdef ENABLE_SLOW_DCHECKS

Powered by Google App Engine
This is Rietveld 408576698