Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index 7be1f91b8649f0a828baabcc1c9a7ce1f0422767..f983044f9340debf9646223cf55587c7098be816 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) \ |
@@ -1232,8 +1233,23 @@ 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(); \ |
+ /* See Linkage::GetJSCallDescriptor(). */ \ |
+ int argc_index = state->parameter_count() - 2; \ |
+ 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 |