| 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(empty_string, EmptyString) \ | 25 V(empty_string, EmptyString) \ |
| 28 V(EmptyFixedArray, EmptyFixedArray) \ | 26 V(EmptyFixedArray, EmptyFixedArray) \ |
| 29 V(FalseValue, False) \ | 27 V(FalseValue, False) \ |
| 30 V(FixedArrayMap, FixedArrayMap) \ | 28 V(FixedArrayMap, FixedArrayMap) \ |
| 31 V(FixedCOWArrayMap, FixedCOWArrayMap) \ | 29 V(FixedCOWArrayMap, FixedCOWArrayMap) \ |
| 32 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ | 30 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ |
| 33 V(HeapNumberMap, HeapNumberMap) \ | 31 V(HeapNumberMap, HeapNumberMap) \ |
| 34 V(MinusZeroValue, MinusZero) \ | 32 V(MinusZeroValue, MinusZero) \ |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 compiler::Node* IsName(compiler::Node* object); | 624 compiler::Node* IsName(compiler::Node* object); |
| 627 compiler::Node* IsJSValue(compiler::Node* object); | 625 compiler::Node* IsJSValue(compiler::Node* object); |
| 628 compiler::Node* IsJSArray(compiler::Node* object); | 626 compiler::Node* IsJSArray(compiler::Node* object); |
| 629 compiler::Node* IsNativeContext(compiler::Node* object); | 627 compiler::Node* IsNativeContext(compiler::Node* object); |
| 630 compiler::Node* IsWeakCell(compiler::Node* object); | 628 compiler::Node* IsWeakCell(compiler::Node* object); |
| 631 compiler::Node* IsFixedDoubleArray(compiler::Node* object); | 629 compiler::Node* IsFixedDoubleArray(compiler::Node* object); |
| 632 compiler::Node* IsHashTable(compiler::Node* object); | 630 compiler::Node* IsHashTable(compiler::Node* object); |
| 633 compiler::Node* IsDictionary(compiler::Node* object); | 631 compiler::Node* IsDictionary(compiler::Node* object); |
| 634 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); | 632 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); |
| 635 | 633 |
| 634 // ElementsKind helpers: |
| 635 compiler::Node* IsFastElementsKind(compiler::Node* elements_kind); |
| 636 compiler::Node* IsHoleyFastElementsKind(compiler::Node* elements_kind); |
| 637 |
| 636 // String helpers. | 638 // String helpers. |
| 637 // Load a character from a String (might flatten a ConsString). | 639 // Load a character from a String (might flatten a ConsString). |
| 638 compiler::Node* StringCharCodeAt(compiler::Node* string, | 640 compiler::Node* StringCharCodeAt(compiler::Node* string, |
| 639 compiler::Node* smi_index); | 641 compiler::Node* smi_index); |
| 640 // Return the single character string with only {code}. | 642 // Return the single character string with only {code}. |
| 641 compiler::Node* StringFromCharCode(compiler::Node* code); | 643 compiler::Node* StringFromCharCode(compiler::Node* code); |
| 642 // Return a new string object which holds a substring containing the range | 644 // Return a new string object which holds a substring containing the range |
| 643 // [from,to[ of string. |from| and |to| are expected to be tagged. | 645 // [from,to[ of string. |from| and |to| are expected to be tagged. |
| 644 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, | 646 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, |
| 645 compiler::Node* from, compiler::Node* to); | 647 compiler::Node* from, compiler::Node* to); |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 } | 1281 } |
| 1280 #else | 1282 #else |
| 1281 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1283 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
| 1282 #endif | 1284 #endif |
| 1283 | 1285 |
| 1284 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1286 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1285 | 1287 |
| 1286 } // namespace internal | 1288 } // namespace internal |
| 1287 } // namespace v8 | 1289 } // namespace v8 |
| 1288 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1290 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |