@@ -106,23 +106,10 @@ impl<'a, 'gc, 'scope> CompileContext<'a, 'gc, 'scope> {
106
106
/// current context.
107
107
pub ( crate ) fn compile_class_static_field (
108
108
& mut self ,
109
- property_key : & ast:: PropertyKey < ' _ > ,
110
- value : & Option < ast:: Expression < ' _ > > ,
109
+ identifier_name : & ast:: IdentifierName ,
110
+ value : & Option < ast:: Expression > ,
111
111
) {
112
- let identifier = match property_key {
113
- ast:: PropertyKey :: StaticIdentifier ( identifier_name) => {
114
- String :: from_str ( self . agent , identifier_name. name . as_str ( ) , self . gc )
115
- }
116
- ast:: PropertyKey :: PrivateIdentifier ( _private_identifier) => todo ! ( ) ,
117
- ast:: PropertyKey :: BooleanLiteral ( _boolean_literal) => todo ! ( ) ,
118
- ast:: PropertyKey :: NullLiteral ( _null_literal) => todo ! ( ) ,
119
- ast:: PropertyKey :: NumericLiteral ( _numeric_literal) => todo ! ( ) ,
120
- ast:: PropertyKey :: BigIntLiteral ( _big_int_literal) => todo ! ( ) ,
121
- ast:: PropertyKey :: RegExpLiteral ( _reg_exp_literal) => todo ! ( ) ,
122
- ast:: PropertyKey :: StringLiteral ( _string_literal) => todo ! ( ) ,
123
- ast:: PropertyKey :: TemplateLiteral ( _template_literal) => todo ! ( ) ,
124
- _ => unreachable ! ( ) ,
125
- } ;
112
+ let identifier = String :: from_str ( self . agent , identifier_name. name . as_str ( ) , self . gc ) ;
126
113
// Turn the static name to a 'this' property access.
127
114
self . add_instruction ( Instruction :: ResolveThisBinding ) ;
128
115
self . add_instruction_with_identifier (
@@ -2267,16 +2254,6 @@ impl CompileEvaluation for ast::VariableDeclaration<'_> {
2267
2254
}
2268
2255
}
2269
2256
2270
- impl CompileEvaluation for ast:: Declaration < ' _ > {
2271
- fn compile ( & self , ctx : & mut CompileContext ) {
2272
- match self {
2273
- ast:: Declaration :: VariableDeclaration ( x) => x. compile ( ctx) ,
2274
- ast:: Declaration :: FunctionDeclaration ( x) => x. compile ( ctx) ,
2275
- other => todo ! ( "{other:?}" ) ,
2276
- }
2277
- }
2278
- }
2279
-
2280
2257
impl CompileEvaluation for ast:: BlockStatement < ' _ > {
2281
2258
fn compile ( & self , ctx : & mut CompileContext ) {
2282
2259
if self . body . is_empty ( ) {
0 commit comments