OLD | NEW |
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" |
11 #include "src/globals.h" | 11 #include "src/globals.h" |
12 #include "src/objects.h" | 12 #include "src/objects.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 class CallInterfaceDescriptor; | 17 class CallInterfaceDescriptor; |
18 class StatsCounter; | 18 class StatsCounter; |
19 class StubCache; | 19 class StubCache; |
20 | 20 |
21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; | 21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; |
22 | 22 |
23 enum class IterationKind { kKeys, kValues, kEntries }; | |
24 | |
25 #define HEAP_CONSTANT_LIST(V) \ | 23 #define HEAP_CONSTANT_LIST(V) \ |
26 V(BooleanMap, BooleanMap) \ | 24 V(BooleanMap, BooleanMap) \ |
27 V(CodeMap, CodeMap) \ | 25 V(CodeMap, CodeMap) \ |
28 V(empty_string, EmptyString) \ | 26 V(empty_string, EmptyString) \ |
29 V(EmptyFixedArray, EmptyFixedArray) \ | 27 V(EmptyFixedArray, EmptyFixedArray) \ |
30 V(FalseValue, False) \ | 28 V(FalseValue, False) \ |
31 V(FixedArrayMap, FixedArrayMap) \ | 29 V(FixedArrayMap, FixedArrayMap) \ |
32 V(FixedCOWArrayMap, FixedCOWArrayMap) \ | 30 V(FixedCOWArrayMap, FixedCOWArrayMap) \ |
33 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ | 31 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ |
34 V(HeapNumberMap, HeapNumberMap) \ | 32 V(HeapNumberMap, HeapNumberMap) \ |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 compiler::Node* IsName(compiler::Node* object); | 625 compiler::Node* IsName(compiler::Node* object); |
628 compiler::Node* IsJSValue(compiler::Node* object); | 626 compiler::Node* IsJSValue(compiler::Node* object); |
629 compiler::Node* IsJSArray(compiler::Node* object); | 627 compiler::Node* IsJSArray(compiler::Node* object); |
630 compiler::Node* IsNativeContext(compiler::Node* object); | 628 compiler::Node* IsNativeContext(compiler::Node* object); |
631 compiler::Node* IsWeakCell(compiler::Node* object); | 629 compiler::Node* IsWeakCell(compiler::Node* object); |
632 compiler::Node* IsFixedDoubleArray(compiler::Node* object); | 630 compiler::Node* IsFixedDoubleArray(compiler::Node* object); |
633 compiler::Node* IsHashTable(compiler::Node* object); | 631 compiler::Node* IsHashTable(compiler::Node* object); |
634 compiler::Node* IsDictionary(compiler::Node* object); | 632 compiler::Node* IsDictionary(compiler::Node* object); |
635 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); | 633 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); |
636 | 634 |
| 635 // ElementsKind helpers: |
| 636 compiler::Node* IsFastElementsKind(compiler::Node* elements_kind); |
| 637 compiler::Node* IsHoleyFastElementsKind(compiler::Node* elements_kind); |
| 638 |
637 // String helpers. | 639 // String helpers. |
638 // Load a character from a String (might flatten a ConsString). | 640 // Load a character from a String (might flatten a ConsString). |
639 compiler::Node* StringCharCodeAt(compiler::Node* string, | 641 compiler::Node* StringCharCodeAt(compiler::Node* string, |
640 compiler::Node* smi_index); | 642 compiler::Node* smi_index); |
641 // Return the single character string with only {code}. | 643 // Return the single character string with only {code}. |
642 compiler::Node* StringFromCharCode(compiler::Node* code); | 644 compiler::Node* StringFromCharCode(compiler::Node* code); |
643 // Return a new string object which holds a substring containing the range | 645 // Return a new string object which holds a substring containing the range |
644 // [from,to[ of string. |from| and |to| are expected to be tagged. | 646 // [from,to[ of string. |from| and |to| are expected to be tagged. |
645 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, | 647 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, |
646 compiler::Node* from, compiler::Node* to); | 648 compiler::Node* from, compiler::Node* to); |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 } | 1289 } |
1288 #else | 1290 #else |
1289 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1291 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1290 #endif | 1292 #endif |
1291 | 1293 |
1292 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1294 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1293 | 1295 |
1294 } // namespace internal | 1296 } // namespace internal |
1295 } // namespace v8 | 1297 } // namespace v8 |
1296 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1298 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |