Chromium Code Reviews| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 333 compiler::Node* LoadContextElement(compiler::Node* context, int slot_index); | 331 compiler::Node* LoadContextElement(compiler::Node* context, int slot_index); |
| 334 compiler::Node* LoadContextElement(compiler::Node* context, | 332 compiler::Node* LoadContextElement(compiler::Node* context, |
| 335 compiler::Node* slot_index); | 333 compiler::Node* slot_index); |
| 336 compiler::Node* StoreContextElement(compiler::Node* context, int slot_index, | 334 compiler::Node* StoreContextElement(compiler::Node* context, int slot_index, |
| 337 compiler::Node* value); | 335 compiler::Node* value); |
| 338 compiler::Node* StoreContextElement(compiler::Node* context, | 336 compiler::Node* StoreContextElement(compiler::Node* context, |
| 339 compiler::Node* slot_index, | 337 compiler::Node* slot_index, |
| 340 compiler::Node* value); | 338 compiler::Node* value); |
| 341 compiler::Node* LoadNativeContext(compiler::Node* context); | 339 compiler::Node* LoadNativeContext(compiler::Node* context); |
| 342 | 340 |
| 341 compiler::Node* IsInAnyNativeContext(compiler::Node* object, uint32_t index); | |
|
Benedikt Meurer
2016/11/09 20:00:32
Drop these dead declarations.
caitp
2016/11/09 20:55:24
Done.
| |
| 342 compiler::Node* IsAnyInitialArrayPrototype(compiler::Node* object); | |
| 343 compiler::Node* IsAnyInitialObjectPrototype(compiler::Node* object); | |
| 344 | |
| 343 compiler::Node* LoadJSArrayElementsMap(ElementsKind kind, | 345 compiler::Node* LoadJSArrayElementsMap(ElementsKind kind, |
| 344 compiler::Node* native_context); | 346 compiler::Node* native_context); |
| 345 | 347 |
| 346 // Store the floating point value of a HeapNumber. | 348 // Store the floating point value of a HeapNumber. |
| 347 compiler::Node* StoreHeapNumberValue(compiler::Node* object, | 349 compiler::Node* StoreHeapNumberValue(compiler::Node* object, |
| 348 compiler::Node* value); | 350 compiler::Node* value); |
| 349 // Store a field to an object on the heap. | 351 // Store a field to an object on the heap. |
| 350 compiler::Node* StoreObjectField( | 352 compiler::Node* StoreObjectField( |
| 351 compiler::Node* object, int offset, compiler::Node* value); | 353 compiler::Node* object, int offset, compiler::Node* value); |
| 352 compiler::Node* StoreObjectField(compiler::Node* object, | 354 compiler::Node* StoreObjectField(compiler::Node* object, |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 624 compiler::Node* IsName(compiler::Node* object); | 626 compiler::Node* IsName(compiler::Node* object); |
| 625 compiler::Node* IsJSValue(compiler::Node* object); | 627 compiler::Node* IsJSValue(compiler::Node* object); |
| 626 compiler::Node* IsJSArray(compiler::Node* object); | 628 compiler::Node* IsJSArray(compiler::Node* object); |
| 627 compiler::Node* IsNativeContext(compiler::Node* object); | 629 compiler::Node* IsNativeContext(compiler::Node* object); |
| 628 compiler::Node* IsWeakCell(compiler::Node* object); | 630 compiler::Node* IsWeakCell(compiler::Node* object); |
| 629 compiler::Node* IsFixedDoubleArray(compiler::Node* object); | 631 compiler::Node* IsFixedDoubleArray(compiler::Node* object); |
| 630 compiler::Node* IsHashTable(compiler::Node* object); | 632 compiler::Node* IsHashTable(compiler::Node* object); |
| 631 compiler::Node* IsDictionary(compiler::Node* object); | 633 compiler::Node* IsDictionary(compiler::Node* object); |
| 632 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); | 634 compiler::Node* IsUnseededNumberDictionary(compiler::Node* object); |
| 633 | 635 |
| 636 // ElementsKind helpers: | |
| 637 compiler::Node* IsFastElementsKind(compiler::Node* elements_kind); | |
| 638 compiler::Node* IsHoleyFastElementsKind(compiler::Node* elements_kind); | |
| 639 | |
| 634 // String helpers. | 640 // String helpers. |
| 635 // Load a character from a String (might flatten a ConsString). | 641 // Load a character from a String (might flatten a ConsString). |
| 636 compiler::Node* StringCharCodeAt(compiler::Node* string, | 642 compiler::Node* StringCharCodeAt(compiler::Node* string, |
| 637 compiler::Node* smi_index); | 643 compiler::Node* smi_index); |
| 638 // Return the single character string with only {code}. | 644 // Return the single character string with only {code}. |
| 639 compiler::Node* StringFromCharCode(compiler::Node* code); | 645 compiler::Node* StringFromCharCode(compiler::Node* code); |
| 640 // Return a new string object which holds a substring containing the range | 646 // Return a new string object which holds a substring containing the range |
| 641 // [from,to[ of string. |from| and |to| are expected to be tagged. | 647 // [from,to[ of string. |from| and |to| are expected to be tagged. |
| 642 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, | 648 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, |
| 643 compiler::Node* from, compiler::Node* to); | 649 compiler::Node* from, compiler::Node* to); |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1270 } | 1276 } |
| 1271 #else | 1277 #else |
| 1272 #define CSA_SLOW_ASSERT(x) | 1278 #define CSA_SLOW_ASSERT(x) |
| 1273 #endif | 1279 #endif |
| 1274 | 1280 |
| 1275 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1281 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1276 | 1282 |
| 1277 } // namespace internal | 1283 } // namespace internal |
| 1278 } // namespace v8 | 1284 } // namespace v8 |
| 1279 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1285 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |