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

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

Issue 2358263002: [builtins] migrate C++ String Iterator builtins to baseline TurboFan (Closed)
Patch Set: add "break;" statement to switch case Created 4 years, 3 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 79265793a1993f793fc718933678c7bea4c89185..73963b7a64895de1a1871967f61035bbaa2071ce 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -19,6 +19,12 @@ class StubCache;
enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
+enum class UnicodeEncoding {
+ // Different unicode encodings in a |word32|:
+ UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate
+ UTF32, // full UTF32 code unit / Unicode codepoint
+};
+
// Provides JavaScript-specific "macro-assembler" functionality on top of the
// CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
// it's possible to add JavaScript-specific useful CodeAssembler "macros"
@@ -447,6 +453,9 @@ class CodeStubAssembler : public compiler::CodeAssembler {
// Return the single character string with only {code}.
compiler::Node* StringFromCharCode(compiler::Node* code);
+ compiler::Node* StringFromCodePoint(compiler::Node* codepoint,
+ UnicodeEncoding encoding);
+
// Type conversion helpers.
// Convert a String to a Number.
compiler::Node* StringToNumber(compiler::Node* context,

Powered by Google App Engine
This is Rietveld 408576698