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

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
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index e430901212d79caa33e4747f5d5a1df5860aa69a..01637856aba539900fc46950100bb59463f06648 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.
@@ -1529,19 +1531,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 +1569,8 @@ class ToDirectStringAssembler : public CodeStubAssembler {
Variable var_instance_type_;
Variable var_offset_;
Variable var_is_external_;
+
+ const Flags flags_;
};
#ifdef DEBUG

Powered by Google App Engine
This is Rietveld 408576698