@@ -715,7 +715,6 @@ export namespace BuiltinNames {
715715 export const i31_new = "~lib/builtins/i31.new" ;
716716 export const i31_get = "~lib/builtins/i31.get" ;
717717
718- export const string_const = "~lib/builtins/string.const_" ;
719718 export const string_new_utf8 = "~lib/builtins/string.new_utf8" ;
720719 export const string_new_utf8_array = "~lib/builtins/string.new_utf8_array" ;
721720 export const string_new_lossy_utf8 = "~lib/builtins/string.new_lossy_utf8" ;
@@ -10871,33 +10870,6 @@ builtinFunctions.set(BuiltinNames.i32x4_relaxed_dot_i8x16_i7x16_add_s, builtin_i
1087110870
1087210871// === Stringref ==============================================================================
1087310872
10874- // string.const(str: string) -> stringref
10875- function builtin_string_const ( ctx : BuiltinFunctionContext ) : ExpressionRef {
10876- let compiler = ctx . compiler ;
10877- let module = compiler . module ;
10878- if (
10879- checkFeatureEnabled ( ctx , Feature . Stringref ) |
10880- checkTypeAbsent ( ctx ) |
10881- checkArgsRequired ( ctx , 1 )
10882- ) return module . unreachable ( ) ;
10883- let operands = ctx . operands ;
10884- let node = operands [ 0 ] ;
10885- if ( node . kind == NodeKind . Literal ) {
10886- let literal = < LiteralExpression > node ;
10887- if ( literal . literalKind == LiteralKind . String ) {
10888- compiler . currentType = Type . string ;
10889- return module . string_const ( ( < StringLiteralExpression > literal ) . value ) ;
10890- }
10891- }
10892- compiler . error (
10893- DiagnosticCode . String_literal_expected ,
10894- node . range
10895- ) ;
10896- compiler . currentType = Type . string ;
10897- return module . unreachable ( ) ;
10898- }
10899- builtinFunctions . set ( BuiltinNames . string_const , builtin_string_const ) ;
10900-
1090110873// string.new_utf8(ptr: usize, bytes: i32, immMemory?: i32) -> stringref
1090210874function builtin_string_new_utf8 ( ctx : BuiltinFunctionContext ) : ExpressionRef {
1090310875 let compiler = ctx . compiler ;
0 commit comments