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

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

Issue 2859203002: [string] Move String.p.toLowerCase to CSA (Closed)
Patch Set: Address comments Created 3 years, 7 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
« no previous file with comments | « src/builtins/builtins-intl-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index e430901212d79caa33e4747f5d5a1df5860aa69a..7594ea22f636c4b39c9eb60fce2852ac8f0c96a6 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -420,6 +420,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Load length field of a String object.
Node* LoadStringLength(Node* object);
+ // Loads a pointer to the sequential String char array.
+ Node* PointerToSeqStringData(Node* seq_string);
// Load value field of a JSValue object.
Node* LoadJSValueValue(Node* object);
// Load value field of a WeakCell object.
@@ -740,6 +742,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* IsShortExternalStringInstanceType(Node* instance_type);
Node* IsSequentialStringInstanceType(Node* instance_type);
Node* IsConsStringInstanceType(Node* instance_type);
+ Node* IsIndirectStringInstanceType(Node* instance_type);
Node* IsString(Node* object);
Node* IsJSObject(Node* object);
Node* IsJSGlobalProxy(Node* object);
@@ -1529,19 +1532,28 @@ class ToDirectStringAssembler : public CodeStubAssembler {
enum StringPointerKind { PTR_TO_DATA, PTR_TO_STRING };
public:
- explicit ToDirectStringAssembler(compiler::CodeAssemblerState* state,
- Node* string);
+ enum Flag {
+ kDontUnpackSlicedStrings = 1 << 0,
+ };
+ typedef base::Flags<Flag> Flags;
+
+ ToDirectStringAssembler(compiler::CodeAssemblerState* state, Node* string,
+ Flags flags = Flags());
// Converts flat cons, thin, and sliced strings and returns the direct
// string. The result can be either a sequential or external string.
+ // Jumps to if_bailout if the string if the string is indirect and cannot
+ // be unpacked.
Node* TryToDirect(Label* if_bailout);
// Returns a pointer to the beginning of the string data.
+ // Jumps to if_bailout if the external string cannot be unpacked.
Node* PointerToData(Label* if_bailout) {
return TryToSequential(PTR_TO_DATA, if_bailout);
}
// Returns a pointer that, offset-wise, looks like a String.
+ // Jumps to if_bailout if the external string cannot be unpacked.
Node* PointerToString(Label* if_bailout) {
return TryToSequential(PTR_TO_STRING, if_bailout);
}
@@ -1558,6 +1570,8 @@ class ToDirectStringAssembler : public CodeStubAssembler {
Variable var_instance_type_;
Variable var_offset_;
Variable var_is_external_;
+
+ const Flags flags_;
};
#ifdef DEBUG
« no previous file with comments | « src/builtins/builtins-intl-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698