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

Unified Diff: src/compiler/code-stub-assembler.h

Issue 1868963002: [builtins] Migrate String.prototype.charCodeAt and String.prototype.charAt to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/code-stub-assembler.h
diff --git a/src/compiler/code-stub-assembler.h b/src/compiler/code-stub-assembler.h
index 5c8c20c5e734263e211e2e014833ef023da9a239..aea64d5d0fc2431b6fb24252803335ca9e7d5dfb 100644
--- a/src/compiler/code-stub-assembler.h
+++ b/src/compiler/code-stub-assembler.h
@@ -166,7 +166,10 @@ class CodeStubAssembler {
Node* ExternalConstant(ExternalReference address);
Node* Float64Constant(double value);
Node* BooleanMapConstant();
+ Node* EmptyStringConstant();
Node* HeapNumberMapConstant();
+ Node* NaNConstant();
+ Node* NoContextConstant();
Node* NullConstant();
Node* UndefinedConstant();
@@ -282,9 +285,11 @@ class CodeStubAssembler {
Node* SmiTag(Node* value);
// Untag a Smi value as a Word.
Node* SmiUntag(Node* value);
+ Node* SmiToWord(Node* value) { return SmiUntag(value); }
// Smi conversions.
Node* SmiToFloat64(Node* value);
+ Node* SmiFromWord32(Node* value);
Node* SmiToWord32(Node* value);
// Smi operations.
@@ -293,6 +298,7 @@ class CodeStubAssembler {
Node* SmiSub(Node* a, Node* b);
Node* SmiSubWithOverflow(Node* a, Node* b);
Node* SmiEqual(Node* a, Node* b);
+ Node* SmiAboveOrEqual(Node* a, Node* b);
Node* SmiLessThan(Node* a, Node* b);
Node* SmiLessThanOrEqual(Node* a, Node* b);
Node* SmiMin(Node* a, Node* b);
@@ -312,6 +318,10 @@ class CodeStubAssembler {
// Load a field from an object on the heap.
Node* LoadObjectField(Node* object, int offset,
MachineType rep = MachineType::AnyTagged());
+ // Store a field to an object on the heap.
+ Node* StoreObjectFieldNoWriteBarrier(
+ Node* object, int offset, Node* value,
+ MachineRepresentation rep = MachineRepresentation::kTagged);
// Load the floating point value of a HeapNumber.
Node* LoadHeapNumberValue(Node* object);
// Store the floating point value of a HeapNumber.
@@ -341,12 +351,19 @@ class CodeStubAssembler {
// Allocate an object of the given size.
Node* Allocate(int size, AllocationFlags flags = kNone);
+ Node* InnerAllocate(Node* previous, int offset);
// Allocate a HeapNumber without initializing its value.
Node* AllocateHeapNumber();
// Allocate a HeapNumber with a specific value.
Node* AllocateHeapNumberWithValue(Node* value);
+ // Allocate a SeqOneByteString with the given length.
+ Node* AllocateSeqOneByteString(int length);
+ // Allocate a SeqTwoByteString with the given length.
+ Node* AllocateSeqTwoByteString(int length);
// Store an array element to a FixedArray.
+ Node* StoreFixedArrayElementInt32Index(Node* object, Node* index,
+ Node* value);
Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index,
Node* value);
// Load the Map of an HeapObject.
@@ -375,6 +392,17 @@ class CodeStubAssembler {
Node* TruncateTaggedToFloat64(Node* context, Node* value);
Node* TruncateTaggedToWord32(Node* context, Node* value);
+ // Type conversions.
+ // Throws a TypeError for {method_name} if {value} is not coercible to Object,
+ // or returns the {value} converted to a String otherwise.
+ Node* ToThisString(Node* context, Node* value, char const* method_name);
+
+ // String helpers.
+ // Load a character from a String (might flatten a ConsString).
+ Node* StringCharCodeAt(Node* string, Node* smi_index);
+ // Return the single character string with only {code}.
+ Node* StringFromCharCode(Node* code);
+
// Branching helpers.
// TODO(danno): Can we be more cleverish wrt. edge-split?
void BranchIf(Node* condition, Label* if_true, Label* if_false);

Powered by Google App Engine
This is Rietveld 408576698