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

Side by Side Diff: src/code-stub-assembler.h

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: Make gcmole happy Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-promise.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 10 matching lines...) Expand all
21 21
22 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; 22 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
23 23
24 #define HEAP_CONSTANT_LIST(V) \ 24 #define HEAP_CONSTANT_LIST(V) \
25 V(AccessorInfoMap, AccessorInfoMap) \ 25 V(AccessorInfoMap, AccessorInfoMap) \
26 V(AllocationSiteMap, AllocationSiteMap) \ 26 V(AllocationSiteMap, AllocationSiteMap) \
27 V(BooleanMap, BooleanMap) \ 27 V(BooleanMap, BooleanMap) \
28 V(CodeMap, CodeMap) \ 28 V(CodeMap, CodeMap) \
29 V(empty_string, EmptyString) \ 29 V(empty_string, EmptyString) \
30 V(EmptyFixedArray, EmptyFixedArray) \ 30 V(EmptyFixedArray, EmptyFixedArray) \
31 V(EmptyLiteralsArray, EmptyLiteralsArray) \
31 V(FalseValue, False) \ 32 V(FalseValue, False) \
32 V(FixedArrayMap, FixedArrayMap) \ 33 V(FixedArrayMap, FixedArrayMap) \
33 V(FixedCOWArrayMap, FixedCOWArrayMap) \ 34 V(FixedCOWArrayMap, FixedCOWArrayMap) \
34 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ 35 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \
35 V(FunctionTemplateInfoMap, FunctionTemplateInfoMap) \ 36 V(FunctionTemplateInfoMap, FunctionTemplateInfoMap) \
36 V(HeapNumberMap, HeapNumberMap) \ 37 V(HeapNumberMap, HeapNumberMap) \
37 V(MinusZeroValue, MinusZero) \ 38 V(MinusZeroValue, MinusZero) \
38 V(NanValue, Nan) \ 39 V(NanValue, Nan) \
39 V(NullValue, Null) \ 40 V(NullValue, Null) \
40 V(SymbolMap, SymbolMap) \ 41 V(SymbolMap, SymbolMap) \
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 1226
1226 CodeStubAssembler* assembler_; 1227 CodeStubAssembler* assembler_;
1227 Node* argc_; 1228 Node* argc_;
1228 Node* arguments_; 1229 Node* arguments_;
1229 Node* fp_; 1230 Node* fp_;
1230 }; 1231 };
1231 1232
1232 #ifdef DEBUG 1233 #ifdef DEBUG
1233 #define CSA_ASSERT(csa, x) \ 1234 #define CSA_ASSERT(csa, x) \
1234 (csa)->Assert([&] { return (x); }, #x, __FILE__, __LINE__) 1235 (csa)->Assert([&] { return (x); }, #x, __FILE__, __LINE__)
1236 #define CSA_ASSERT_JS_ARGC_OP(csa, Op, op, expected) \
1237 (csa)->Assert( \
1238 [&] { \
1239 const CodeAssemblerState* state = (csa)->state(); \
1240 /* See Linkage::GetJSCallDescriptor(). */ \
1241 int argc_index = state->parameter_count() - 2; \
1242 compiler::Node* const argc = (csa)->Parameter(argc_index); \
1243 return (csa)->Op(argc, (csa)->Int32Constant(expected)); \
1244 }, \
1245 "argc " #op " " #expected, __FILE__, __LINE__)
1246
1247 #define CSA_ASSERT_JS_ARGC_EQ(csa, expected) \
1248 CSA_ASSERT_JS_ARGC_OP(csa, Word32Equal, ==, expected)
1249
1235 #else 1250 #else
1236 #define CSA_ASSERT(csa, x) ((void)0) 1251 #define CSA_ASSERT(csa, x) ((void)0)
1252 #define CSA_ASSERT_JS_ARGC_EQ(csa, expected) ((void)0)
1237 #endif 1253 #endif
1238 1254
1239 #ifdef ENABLE_SLOW_DCHECKS 1255 #ifdef ENABLE_SLOW_DCHECKS
1240 #define CSA_SLOW_ASSERT(csa, x) \ 1256 #define CSA_SLOW_ASSERT(csa, x) \
1241 if (FLAG_enable_slow_asserts) { \ 1257 if (FLAG_enable_slow_asserts) { \
1242 (csa)->Assert([&] { return (x); }, #x, __FILE__, __LINE__); \ 1258 (csa)->Assert([&] { return (x); }, #x, __FILE__, __LINE__); \
1243 } 1259 }
1244 #else 1260 #else
1245 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1261 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1246 #endif 1262 #endif
1247 1263
1248 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1264 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1249 1265
1250 } // namespace internal 1266 } // namespace internal
1251 } // namespace v8 1267 } // namespace v8
1252 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1268 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-promise.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698