Chromium Code Reviews| 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 |