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, |