Browse Source

Merge pull request #254 from dop251/shorthandProperties

Shorthand properties
Dmitry Panov 4 years ago
parent
commit
ed7b3dc62e
6 changed files with 206 additions and 65 deletions
  1. 36 14
      compiler_expr.go
  2. 64 0
      compiler_test.go
  3. 17 0
      object_test.go
  4. 60 31
      parser/expression.go
  5. 5 5
      parser/lexer.go
  6. 24 15
      tc39_test.go

+ 36 - 14
compiler_expr.go

@@ -98,8 +98,10 @@ type compiledIdentifierExpr struct {
 
 
 type compiledFunctionLiteral struct {
 type compiledFunctionLiteral struct {
 	baseCompiledExpr
 	baseCompiledExpr
-	expr   *ast.FunctionLiteral
-	isExpr bool
+	expr    *ast.FunctionLiteral
+	lhsName unistring.String
+	isExpr  bool
+	strict  bool
 }
 }
 
 
 type compiledBracketExpr struct {
 type compiledBracketExpr struct {
@@ -659,6 +661,13 @@ func (e *compiledAssignExpr) emitGetter(putOnStack bool) {
 	e.addSrcMap()
 	e.addSrcMap()
 	switch e.operator {
 	switch e.operator {
 	case token.ASSIGN:
 	case token.ASSIGN:
+		if fn, ok := e.right.(*compiledFunctionLiteral); ok {
+			if fn.expr.Name == nil {
+				if id, ok := e.left.(*compiledIdentifierExpr); ok {
+					fn.lhsName = id.name
+				}
+			}
+		}
 		e.left.emitSetter(e.right)
 		e.left.emitSetter(e.right)
 	case token.PLUS:
 	case token.PLUS:
 		e.left.emitUnary(nil, func() {
 		e.left.emitUnary(nil, func() {
@@ -754,8 +763,15 @@ func (e *compiledFunctionLiteral) emitGetter(putOnStack bool) {
 	}
 	}
 	e.c.blockStart = 0
 	e.c.blockStart = 0
 
 
+	var name unistring.String
 	if e.expr.Name != nil {
 	if e.expr.Name != nil {
-		e.c.p.funcName = e.expr.Name.Name
+		name = e.expr.Name.Name
+	} else {
+		name = e.lhsName
+	}
+
+	if name != "" {
+		e.c.p.funcName = name
 	}
 	}
 	block := e.c.block
 	block := e.c.block
 	e.c.block = nil
 	e.c.block = nil
@@ -764,13 +780,10 @@ func (e *compiledFunctionLiteral) emitGetter(putOnStack bool) {
 	}()
 	}()
 
 
 	if !e.c.scope.strict {
 	if !e.c.scope.strict {
-		e.c.scope.strict = e.c.isStrictStatement(e.expr.Body)
+		e.c.scope.strict = e.strict
 	}
 	}
 
 
 	if e.c.scope.strict {
 	if e.c.scope.strict {
-		if e.expr.Name != nil {
-			e.c.checkIdentifierLName(e.expr.Name.Name, int(e.expr.Name.Idx)-1)
-		}
 		for _, item := range e.expr.ParameterList.List {
 		for _, item := range e.expr.ParameterList.List {
 			e.c.checkIdentifierName(item.Name, int(item.Idx)-1)
 			e.c.checkIdentifierName(item.Name, int(item.Idx)-1)
 			e.c.checkIdentifierLName(item.Name, int(item.Idx)-1)
 			e.c.checkIdentifierLName(item.Name, int(item.Idx)-1)
@@ -874,10 +887,6 @@ func (e *compiledFunctionLiteral) emitGetter(putOnStack bool) {
 	e.c.popScope()
 	e.c.popScope()
 	e.c.p = savedPrg
 	e.c.p = savedPrg
 	e.c.blockStart = savedBlockStart
 	e.c.blockStart = savedBlockStart
-	var name unistring.String
-	if e.expr.Name != nil {
-		name = e.expr.Name.Name
-	}
 	e.c.emit(&newFunc{prg: p, length: uint32(length), name: name, srcStart: uint32(e.expr.Idx0() - 1), srcEnd: uint32(e.expr.Idx1() - 1), strict: strict})
 	e.c.emit(&newFunc{prg: p, length: uint32(length), name: name, srcStart: uint32(e.expr.Idx0() - 1), srcEnd: uint32(e.expr.Idx1() - 1), strict: strict})
 	if !putOnStack {
 	if !putOnStack {
 		e.c.emit(pop)
 		e.c.emit(pop)
@@ -885,12 +894,14 @@ func (e *compiledFunctionLiteral) emitGetter(putOnStack bool) {
 }
 }
 
 
 func (c *compiler) compileFunctionLiteral(v *ast.FunctionLiteral, isExpr bool) compiledExpr {
 func (c *compiler) compileFunctionLiteral(v *ast.FunctionLiteral, isExpr bool) compiledExpr {
-	if v.Name != nil && c.scope.strict {
+	strict := c.scope.strict || c.isStrictStatement(v.Body)
+	if v.Name != nil && strict {
 		c.checkIdentifierLName(v.Name.Name, int(v.Name.Idx)-1)
 		c.checkIdentifierLName(v.Name.Name, int(v.Name.Idx)-1)
 	}
 	}
 	r := &compiledFunctionLiteral{
 	r := &compiledFunctionLiteral{
 		expr:   v,
 		expr:   v,
 		isExpr: isExpr,
 		isExpr: isExpr,
+		strict: strict,
 	}
 	}
 	r.init(c, v.Idx0())
 	r.init(c, v.Idx0())
 	return r
 	return r
@@ -1369,6 +1380,9 @@ func (c *compiler) compileVariableExpression(v *ast.VariableExpression) compiled
 		name:        v.Name,
 		name:        v.Name,
 		initializer: c.compileExpression(v.Initializer),
 		initializer: c.compileExpression(v.Initializer),
 	}
 	}
+	if fn, ok := r.initializer.(*compiledFunctionLiteral); ok {
+		fn.lhsName = v.Name
+	}
 	r.init(c, v.Idx0())
 	r.init(c, v.Idx0())
 	return r
 	return r
 }
 }
@@ -1383,7 +1397,13 @@ func (e *compiledObjectLiteral) emitGetter(putOnStack bool) {
 			e.c.throwSyntaxError(e.offset, "non-literal properties in object literal are not supported yet")
 			e.c.throwSyntaxError(e.offset, "non-literal properties in object literal are not supported yet")
 		}
 		}
 		key := cl.val.string()
 		key := cl.val.string()
-		e.c.compileExpression(prop.Value).emitGetter(true)
+		valueExpr := e.c.compileExpression(prop.Value)
+		if fn, ok := valueExpr.(*compiledFunctionLiteral); ok {
+			if fn.expr.Name == nil {
+				fn.lhsName = key
+			}
+		}
+		valueExpr.emitGetter(true)
 		switch prop.Kind {
 		switch prop.Kind {
 		case "value":
 		case "value":
 			if key == __proto__ {
 			if key == __proto__ {
@@ -1391,12 +1411,14 @@ func (e *compiledObjectLiteral) emitGetter(putOnStack bool) {
 			} else {
 			} else {
 				e.c.emit(setProp1(key))
 				e.c.emit(setProp1(key))
 			}
 			}
+		case "method":
+			e.c.emit(setProp1(key))
 		case "get":
 		case "get":
 			e.c.emit(setPropGetter(key))
 			e.c.emit(setPropGetter(key))
 		case "set":
 		case "set":
 			e.c.emit(setPropSetter(key))
 			e.c.emit(setPropSetter(key))
 		default:
 		default:
-			panic(fmt.Errorf("Unknown property kind: %s", prop.Kind))
+			panic(fmt.Errorf("unknown property kind: %s", prop.Kind))
 		}
 		}
 	}
 	}
 	if !putOnStack {
 	if !putOnStack {

+ 64 - 0
compiler_test.go

@@ -2163,6 +2163,70 @@ func TestObjectLiteralWithNumericKeys(t *testing.T) {
 	testScript1(SCRIPT, valueTrue, t)
 	testScript1(SCRIPT, valueTrue, t)
 }
 }
 
 
+func TestEscapedObjectPropertyKeys(t *testing.T) {
+	const SCRIPT = `
+	var obj = {
+		w\u0069th: 42
+	};
+	var obj = {
+		with() {42}
+	};
+	`
+
+	_, err := Compile("", SCRIPT, false)
+	if err != nil {
+		t.Fatal(err)
+	}
+}
+
+func TestObjectLiteralFuncProps(t *testing.T) {
+	const SCRIPT = `
+	(function() {
+		'use strict';
+		var o = {
+			eval: function() {return 1;},
+			arguments() {return 2;},
+			test: function test1() {}
+		}
+		assert.sameValue(o.eval.name, "eval");
+		assert.sameValue(o.arguments.name, "arguments");
+		assert.sameValue(o.eval(), 1);
+		assert.sameValue(o.arguments(), 2);
+		assert.sameValue(o.test.name, "test1");
+	})();
+	`
+
+	testScript1(TESTLIB+SCRIPT, _undefined, t)
+}
+
+func TestFuncName(t *testing.T) {
+	const SCRIPT = `
+	var method = 1;
+	var o = {
+		method: function() {
+			return method;
+		},
+		method1: function method() {
+			return method;
+		}
+	}
+	o.method() === 1 && o.method1() === o.method1;
+	`
+
+	testScript1(SCRIPT, valueTrue, t)
+}
+
+func TestFuncNameAssign(t *testing.T) {
+	const SCRIPT = `
+	var f = function() {};
+	var f1;
+	f1 = function() {};
+	f.name === "f" && f1.name === "f1";
+	`
+
+	testScript1(SCRIPT, valueTrue, t)
+}
+
 func BenchmarkCompile(b *testing.B) {
 func BenchmarkCompile(b *testing.B) {
 	f, err := os.Open("testdata/S15.10.2.12_A1_T1.js")
 	f, err := os.Open("testdata/S15.10.2.12_A1_T1.js")
 
 

+ 17 - 0
object_test.go

@@ -113,6 +113,23 @@ func TestDefinePropertiesSymbol(t *testing.T) {
 	testScript1(SCRIPT, valueTrue, t)
 	testScript1(SCRIPT, valueTrue, t)
 }
 }
 
 
+func TestObjectShorthandProperties(t *testing.T) {
+	const SCRIPT = `
+	var b = 1;
+	var a = {b, get() {return "c"}};
+
+	assert.sameValue(a.b, b, "#1");
+	assert.sameValue(a.get(), "c", "#2");
+
+	var obj = {
+		w\u0069th() { return 42; }
+    };
+
+	assert.sameValue(obj['with'](), 42, 'property exists');
+	`
+	testScript1(TESTLIB+SCRIPT, _undefined, t)
+}
+
 func TestObjectAssign(t *testing.T) {
 func TestObjectAssign(t *testing.T) {
 	const SCRIPT = `
 	const SCRIPT = `
 	assert.sameValue(Object.assign({ b: 1 }, { get a() {
 	assert.sameValue(Object.assign({ b: 1 }, { get a() {

+ 60 - 31
parser/expression.go

@@ -189,7 +189,7 @@ func (self *_parser) parseVariableDeclarationList(var_ file.Idx) []ast.Expressio
 	return list
 	return list
 }
 }
 
 
-func (self *_parser) parseObjectPropertyKey() (string, ast.Expression) {
+func (self *_parser) parseObjectPropertyKey() (unistring.String, ast.Expression, token.Token) {
 	idx, tkn, literal, parsedLiteral := self.idx, self.token, self.literal, self.parsedLiteral
 	idx, tkn, literal, parsedLiteral := self.idx, self.token, self.literal, self.parsedLiteral
 	var value ast.Expression
 	var value ast.Expression
 	self.next()
 	self.next()
@@ -225,43 +225,72 @@ func (self *_parser) parseObjectPropertyKey() (string, ast.Expression) {
 				Literal: literal,
 				Literal: literal,
 				Value:   unistring.String(literal),
 				Value:   unistring.String(literal),
 			}
 			}
+			tkn = token.STRING
 		}
 		}
 	}
 	}
-	return literal, value
+	return parsedLiteral, value, tkn
 }
 }
 
 
 func (self *_parser) parseObjectProperty() ast.Property {
 func (self *_parser) parseObjectProperty() ast.Property {
+	literal, value, tkn := self.parseObjectPropertyKey()
+	if tkn == token.IDENTIFIER || tkn == token.STRING {
+		switch {
+		case self.token == token.LEFT_PARENTHESIS:
+			idx := self.idx
+			parameterList := self.parseFunctionParameterList()
+
+			node := &ast.FunctionLiteral{
+				Function:      idx,
+				ParameterList: parameterList,
+			}
+			self.parseFunctionBlock(node)
 
 
-	literal, value := self.parseObjectPropertyKey()
-	if literal == "get" && self.token != token.COLON {
-		idx := self.idx
-		_, value := self.parseObjectPropertyKey()
-		parameterList := self.parseFunctionParameterList()
+			return ast.Property{
+				Key:   value,
+				Kind:  "method",
+				Value: node,
+			}
+		case self.token == token.COMMA || self.token == token.RIGHT_BRACE: // shorthand property
+			return ast.Property{
+				Key:  value,
+				Kind: "value",
+				Value: &ast.Identifier{
+					Name: literal,
+					Idx:  self.idx,
+				},
+			}
+		case literal == "get" && self.token != token.COLON:
+			idx := self.idx
+			_, value, _ := self.parseObjectPropertyKey()
+			parameterList := self.parseFunctionParameterList()
+
+			node := &ast.FunctionLiteral{
+				Function:      idx,
+				ParameterList: parameterList,
+			}
+			self.parseFunctionBlock(node)
+			return ast.Property{
+				Key:   value,
+				Kind:  "get",
+				Value: node,
+			}
+		case literal == "set" && self.token != token.COLON:
+			idx := self.idx
+			_, value, _ := self.parseObjectPropertyKey()
+			parameterList := self.parseFunctionParameterList()
+
+			node := &ast.FunctionLiteral{
+				Function:      idx,
+				ParameterList: parameterList,
+			}
 
 
-		node := &ast.FunctionLiteral{
-			Function:      idx,
-			ParameterList: parameterList,
-		}
-		self.parseFunctionBlock(node)
-		return ast.Property{
-			Key:   value,
-			Kind:  "get",
-			Value: node,
-		}
-	} else if literal == "set" && self.token != token.COLON {
-		idx := self.idx
-		_, value := self.parseObjectPropertyKey()
-		parameterList := self.parseFunctionParameterList()
-
-		node := &ast.FunctionLiteral{
-			Function:      idx,
-			ParameterList: parameterList,
-		}
-		self.parseFunctionBlock(node)
-		return ast.Property{
-			Key:   value,
-			Kind:  "set",
-			Value: node,
+			self.parseFunctionBlock(node)
+
+			return ast.Property{
+				Key:   value,
+				Kind:  "set",
+				Value: node,
+			}
 		}
 		}
 	}
 	}
 
 

+ 5 - 5
parser/lexer.go

@@ -211,7 +211,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, parsedLiteral unis
 				case 0: // Not a keyword
 				case 0: // Not a keyword
 					if parsedLiteral == "true" || parsedLiteral == "false" {
 					if parsedLiteral == "true" || parsedLiteral == "false" {
 						if hasEscape {
 						if hasEscape {
-							tkn = token.ILLEGAL
+							tkn = token.STRING
 							return
 							return
 						}
 						}
 						self.insertSemicolon = true
 						self.insertSemicolon = true
@@ -219,7 +219,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, parsedLiteral unis
 						return
 						return
 					} else if parsedLiteral == "null" {
 					} else if parsedLiteral == "null" {
 						if hasEscape {
 						if hasEscape {
-							tkn = token.ILLEGAL
+							tkn = token.STRING
 							return
 							return
 						}
 						}
 						self.insertSemicolon = true
 						self.insertSemicolon = true
@@ -229,7 +229,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, parsedLiteral unis
 
 
 				case token.KEYWORD:
 				case token.KEYWORD:
 					if hasEscape {
 					if hasEscape {
-						tkn = token.ILLEGAL
+						tkn = token.STRING
 						return
 						return
 					}
 					}
 					tkn = token.KEYWORD
 					tkn = token.KEYWORD
@@ -247,7 +247,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, parsedLiteral unis
 					token.CONTINUE,
 					token.CONTINUE,
 					token.DEBUGGER:
 					token.DEBUGGER:
 					if hasEscape {
 					if hasEscape {
-						tkn = token.ILLEGAL
+						tkn = token.STRING
 						return
 						return
 					}
 					}
 					self.insertSemicolon = true
 					self.insertSemicolon = true
@@ -255,7 +255,7 @@ func (self *_parser) scan() (tkn token.Token, literal string, parsedLiteral unis
 
 
 				default:
 				default:
 					if hasEscape {
 					if hasEscape {
-						tkn = token.ILLEGAL
+						tkn = token.STRING
 					}
 					}
 					return
 					return
 
 

+ 24 - 15
tc39_test.go

@@ -109,24 +109,22 @@ var (
 		"test/language/statements/class/subclass/builtin-objects/RegExp/super-must-be-called.js":                     true,
 		"test/language/statements/class/subclass/builtin-objects/RegExp/super-must-be-called.js":                     true,
 		"test/language/statements/class/subclass/builtin-objects/RegExp/regular-subclassing.js":                      true,
 		"test/language/statements/class/subclass/builtin-objects/RegExp/regular-subclassing.js":                      true,
 		"test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js":                                true,
 		"test/language/statements/class/subclass/builtin-objects/RegExp/lastIndex.js":                                true,
+		"TestTC39/tc39/test/language/statements/class/definition/fn-name-method.js":                                  true,
+		"test/language/expressions/object/method-definition/name-invoke-ctor.js":                                     true,
+		"test/language/expressions/object/method.js":                                                                 true,
+		"test/language/expressions/object/setter-super-prop.js":                                                      true,
+		"test/language/expressions/object/getter-super-prop.js":                                                      true,
 
 
 		// object literals
 		// object literals
 		"test/built-ins/Array/from/source-object-iterator-1.js":                                                true,
 		"test/built-ins/Array/from/source-object-iterator-1.js":                                                true,
 		"test/built-ins/Array/from/source-object-iterator-2.js":                                                true,
 		"test/built-ins/Array/from/source-object-iterator-2.js":                                                true,
-		"test/built-ins/TypedArray/prototype/fill/fill-values-conversion-once.js":                              true,
-		"test/built-ins/TypedArrays/of/this-is-not-constructor.js":                                             true,
 		"test/built-ins/TypedArrays/of/argument-number-value-throws.js":                                        true,
 		"test/built-ins/TypedArrays/of/argument-number-value-throws.js":                                        true,
-		"test/built-ins/TypedArrays/from/this-is-not-constructor.js":                                           true,
 		"test/built-ins/TypedArrays/from/set-value-abrupt-completion.js":                                       true,
 		"test/built-ins/TypedArrays/from/set-value-abrupt-completion.js":                                       true,
 		"test/built-ins/TypedArrays/from/property-abrupt-completion.js":                                        true,
 		"test/built-ins/TypedArrays/from/property-abrupt-completion.js":                                        true,
-		"test/built-ins/TypedArray/of/this-is-not-constructor.js":                                              true,
-		"test/built-ins/TypedArray/from/this-is-not-constructor.js":                                            true,
-		"test/built-ins/DataView/custom-proto-access-throws.js":                                                true,
 		"test/built-ins/DataView/custom-proto-access-throws-sab.js":                                            true,
 		"test/built-ins/DataView/custom-proto-access-throws-sab.js":                                            true,
 		"test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js":                 true,
 		"test/built-ins/Array/prototype/slice/length-exceeding-integer-limit-proxied-array.js":                 true,
 		"test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js":               true,
 		"test/built-ins/Array/prototype/splice/create-species-length-exceeding-integer-limit.js":               true,
 		"test/built-ins/Array/prototype/splice/property-traps-order-with-species.js":                           true,
 		"test/built-ins/Array/prototype/splice/property-traps-order-with-species.js":                           true,
-		"test/built-ins/Date/prototype/toJSON/invoke-abrupt.js":                                                true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-errors.js":                                 true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-errors.js":                                 true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-toprimitive.js":                            true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-toprimitive.js":                            true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-wrapped-values.js":                         true,
 		"test/built-ins/String/prototype/indexOf/position-tointeger-wrapped-values.js":                         true,
@@ -161,21 +159,14 @@ var (
 		"test/built-ins/String/prototype/trimStart/this-value-object-valueof-meth-priority.js":                 true,
 		"test/built-ins/String/prototype/trimStart/this-value-object-valueof-meth-priority.js":                 true,
 		"test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js":            true,
 		"test/built-ins/String/prototype/trimStart/this-value-object-valueof-returns-object-err.js":            true,
 		"test/built-ins/TypedArray/prototype/sort/sort-tonumber.js":                                            true,
 		"test/built-ins/TypedArray/prototype/sort/sort-tonumber.js":                                            true,
-		"test/built-ins/TypedArrayConstructors/from/property-abrupt-completion.js":                             true,
-		"test/built-ins/TypedArrayConstructors/from/set-value-abrupt-completion.js":                            true,
-		"test/built-ins/TypedArrayConstructors/from/this-is-not-constructor.js":                                true,
-		"test/built-ins/TypedArrayConstructors/of/argument-number-value-throws.js":                             true,
-		"test/built-ins/TypedArrayConstructors/of/this-is-not-constructor.js":                                  true,
 		"test/built-ins/Array/prototype/flatMap/array-like-objects.js":                                         true,
 		"test/built-ins/Array/prototype/flatMap/array-like-objects.js":                                         true,
-		"test/built-ins/Array/prototype/flatMap/array-like-objects-typedarrays.js":                             true,
 		"test/built-ins/Array/prototype/flatMap/array-like-objects-poisoned-length.js":                         true,
 		"test/built-ins/Array/prototype/flatMap/array-like-objects-poisoned-length.js":                         true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species.js":                             true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species.js":                             true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor.js":                 true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor.js":                 true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor-poisoned-throws.js": true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor-poisoned-throws.js": true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-bad-throws.js":                  true,
 		"test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-bad-throws.js":                  true,
-		"test/built-ins/Array/prototype/flatMap/array-like-objects-nested.js":                                  true,
 		"test/built-ins/Proxy/getPrototypeOf/instanceof-target-not-extensible-not-same-proto-throws.js":        true,
 		"test/built-ins/Proxy/getPrototypeOf/instanceof-target-not-extensible-not-same-proto-throws.js":        true,
-		"test/built-ins/Proxy/getPrototypeOf/instanceof-custom-return-accepted.js":                             true,
+		"test/language/statements/class/definition/fn-name-method.js":                                          true,
 
 
 		// arrow-function
 		// arrow-function
 		"test/built-ins/Object/prototype/toString/proxy-function.js":            true,
 		"test/built-ins/Object/prototype/toString/proxy-function.js":            true,
@@ -271,6 +262,16 @@ var (
 
 
 		// generators
 		// generators
 		"test/annexB/built-ins/RegExp/RegExp-control-escape-russian-letter.js": true,
 		"test/annexB/built-ins/RegExp/RegExp-control-escape-russian-letter.js": true,
+
+		// computed properties
+		"test/language/expressions/object/__proto__-permitted-dup.js":                     true,
+		"test/language/expressions/object/method-definition/name-name-prop-symbol.js":     true,
+		"test/language/expressions/object/method-definition/name-prop-name-eval-error.js": true,
+		"test/language/expressions/object/accessor-name-computed-yield-id.js":             true,
+		"test/language/expressions/object/accessor-name-computed-in.js":                   true,
+
+		// get [Symbol.*]
+		"test/language/expressions/object/prop-def-id-eval-error.js": true,
 	}
 	}
 
 
 	featuresBlackList = []string{
 	featuresBlackList = []string{
@@ -278,6 +279,9 @@ var (
 		"BigInt",
 		"BigInt",
 		"generators",
 		"generators",
 		"String.prototype.replaceAll",
 		"String.prototype.replaceAll",
+		"computed-property-names",
+		"default-parameters",
+		"super",
 	}
 	}
 
 
 	es6WhiteList = map[string]bool{}
 	es6WhiteList = map[string]bool{}
@@ -285,8 +289,12 @@ var (
 	es6IdWhiteList = []string{
 	es6IdWhiteList = []string{
 		"8.1.2.1",
 		"8.1.2.1",
 		"9.5",
 		"9.5",
+		"12.2.5",
+		"12.2.6.1",
+		"12.2.6.8",
 		"12.9.3",
 		"12.9.3",
 		"12.9.4",
 		"12.9.4",
+		"14.3.8",
 		"19.1",
 		"19.1",
 		"19.2",
 		"19.2",
 		"19.3",
 		"19.3",
@@ -330,6 +338,7 @@ var (
 		"sec-object.getownpropertydescriptors",
 		"sec-object.getownpropertydescriptors",
 		"sec-object.entries",
 		"sec-object.entries",
 		"sec-object.values",
 		"sec-object.values",
+		"sec-object-initializer",
 		"sec-proxy-*",
 		"sec-proxy-*",
 	}
 	}
 )
 )