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

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

Issue 2384473002: [regexp] Port RegExpConstructResultStub to TurboFan (Closed)
Patch Set: Adapt to new constant accessor style Created 4 years, 2 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-regexp.cc ('k') | src/code-stub-assembler.cc » ('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 UnicodeEncoding { 22 enum class UnicodeEncoding {
23 // Different unicode encodings in a |word32|: 23 // Different unicode encodings in a |word32|:
24 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate 24 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate
25 UTF32, // full UTF32 code unit / Unicode codepoint 25 UTF32, // full UTF32 code unit / Unicode codepoint
26 }; 26 };
27 27
28 #define HEAP_CONSTANT_LIST(V) \ 28 #define HEAP_CONSTANT_LIST(V) \
29 V(BooleanMap, BooleanMap) \ 29 V(BooleanMap, BooleanMap) \
30 V(empty_string, EmptyString) \ 30 V(empty_string, EmptyString) \
31 V(EmptyFixedArray, EmptyFixedArray) \
31 V(FixedArrayMap, FixedArrayMap) \ 32 V(FixedArrayMap, FixedArrayMap) \
32 V(FixedCOWArrayMap, FixedCOWArrayMap) \ 33 V(FixedCOWArrayMap, FixedCOWArrayMap) \
33 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \ 34 V(FixedDoubleArrayMap, FixedDoubleArrayMap) \
34 V(HeapNumberMap, HeapNumberMap) \ 35 V(HeapNumberMap, HeapNumberMap) \
35 V(MinusZeroValue, MinusZero) \ 36 V(MinusZeroValue, MinusZero) \
36 V(NanValue, Nan) \ 37 V(NanValue, Nan) \
37 V(NullValue, Null) \ 38 V(NullValue, Null) \
38 V(TheHoleValue, TheHole) \ 39 V(TheHoleValue, TheHole) \
39 V(UndefinedValue, Undefined) 40 V(UndefinedValue, Undefined)
40 41
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // |length| and |offset| are expected to be tagged. 349 // |length| and |offset| are expected to be tagged.
349 compiler::Node* AllocateSlicedOneByteString(compiler::Node* length, 350 compiler::Node* AllocateSlicedOneByteString(compiler::Node* length,
350 compiler::Node* parent, 351 compiler::Node* parent,
351 compiler::Node* offset); 352 compiler::Node* offset);
352 // Allocate a SlicedTwoByteString with the given length, parent and offset. 353 // Allocate a SlicedTwoByteString with the given length, parent and offset.
353 // |length| and |offset| are expected to be tagged. 354 // |length| and |offset| are expected to be tagged.
354 compiler::Node* AllocateSlicedTwoByteString(compiler::Node* length, 355 compiler::Node* AllocateSlicedTwoByteString(compiler::Node* length,
355 compiler::Node* parent, 356 compiler::Node* parent,
356 compiler::Node* offset); 357 compiler::Node* offset);
357 358
359 // Allocate a RegExpResult with the given length (the number of captures,
360 // including the match itself), index (the index where the match starts),
361 // and input string. |length| and |index| are expected to be tagged, and
362 // |input| must be a string.
363 compiler::Node* AllocateRegExpResult(compiler::Node* context,
364 compiler::Node* length,
365 compiler::Node* index,
366 compiler::Node* input);
367
358 // Allocate a JSArray without elements and initialize the header fields. 368 // Allocate a JSArray without elements and initialize the header fields.
359 compiler::Node* AllocateUninitializedJSArrayWithoutElements( 369 compiler::Node* AllocateUninitializedJSArrayWithoutElements(
360 ElementsKind kind, compiler::Node* array_map, compiler::Node* length, 370 ElementsKind kind, compiler::Node* array_map, compiler::Node* length,
361 compiler::Node* allocation_site); 371 compiler::Node* allocation_site);
362 // Allocate and return a JSArray with initialized header fields and its 372 // Allocate and return a JSArray with initialized header fields and its
363 // uninitialized elements. 373 // uninitialized elements.
364 // The ParameterMode argument is only used for the capacity parameter. 374 // The ParameterMode argument is only used for the capacity parameter.
365 std::pair<compiler::Node*, compiler::Node*> 375 std::pair<compiler::Node*, compiler::Node*>
366 AllocateUninitializedJSArrayWithElements( 376 AllocateUninitializedJSArrayWithElements(
367 ElementsKind kind, compiler::Node* array_map, compiler::Node* length, 377 ElementsKind kind, compiler::Node* array_map, compiler::Node* length,
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 // Create a new weak cell with a specified value and install it into a 817 // Create a new weak cell with a specified value and install it into a
808 // feedback vector. 818 // feedback vector.
809 compiler::Node* CreateWeakCellInFeedbackVector( 819 compiler::Node* CreateWeakCellInFeedbackVector(
810 compiler::Node* feedback_vector, compiler::Node* slot, 820 compiler::Node* feedback_vector, compiler::Node* slot,
811 compiler::Node* value); 821 compiler::Node* value);
812 822
813 // Create a new AllocationSite and install it into a feedback vector. 823 // Create a new AllocationSite and install it into a feedback vector.
814 compiler::Node* CreateAllocationSiteInFeedbackVector( 824 compiler::Node* CreateAllocationSiteInFeedbackVector(
815 compiler::Node* feedback_vector, compiler::Node* slot); 825 compiler::Node* feedback_vector, compiler::Node* slot);
816 826
817 compiler::Node* GetFixedAarrayAllocationSize(compiler::Node* element_count, 827 compiler::Node* GetFixedArrayAllocationSize(compiler::Node* element_count,
818 ElementsKind kind, 828 ElementsKind kind,
819 ParameterMode mode) { 829 ParameterMode mode) {
820 return ElementOffsetFromIndex(element_count, kind, mode, 830 return ElementOffsetFromIndex(element_count, kind, mode,
821 FixedArray::kHeaderSize); 831 FixedArray::kHeaderSize);
822 } 832 }
823 833
824 private: 834 private:
825 enum ElementSupport { kOnlyProperties, kSupportElements }; 835 enum ElementSupport { kOnlyProperties, kSupportElements };
826 836
827 void DescriptorLookupLinear(compiler::Node* unique_name, 837 void DescriptorLookupLinear(compiler::Node* unique_name,
828 compiler::Node* descriptors, compiler::Node* nof, 838 compiler::Node* descriptors, compiler::Node* nof,
829 Label* if_found, Variable* var_name_index, 839 Label* if_found, Variable* var_name_index,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 Label* bailout); 893 Label* bailout);
884 894
885 static const int kElementLoopUnrollThreshold = 8; 895 static const int kElementLoopUnrollThreshold = 8;
886 }; 896 };
887 897
888 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 898 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
889 899
890 } // namespace internal 900 } // namespace internal
891 } // namespace v8 901 } // namespace v8
892 #endif // V8_CODE_STUB_ASSEMBLER_H_ 902 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698