"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (ast, strictCode, env, realm) { if (ast.object.type === "Super") { return (0, _SuperProperty2.default)(ast, strictCode, env, realm); } // 1. Let baseReference be the result of evaluating MemberExpression. var baseReference = env.evaluate(ast.object, strictCode); // 2. Let baseValue be ? GetValue(baseReference). var baseValue = _singletons.Environment.GetValue(realm, baseReference); var propertyNameValue = void 0; if (ast.computed) { // 3. Let propertyNameReference be the result of evaluating Expression. var propertyNameReference = env.evaluate(ast.property, strictCode); // 4. Let propertyNameValue be ? GetValue(propertyNameReference). propertyNameValue = _singletons.Environment.GetValue(realm, propertyNameReference); } else { // 3. Let propertyNameString be StringValue of IdentifierName. propertyNameValue = new _index.StringValue(realm, ast.property.name); } // 5. Let bv be ? RequireObjectCoercible(baseValue). var bv = (0, _index2.RequireObjectCoercible)(realm, baseValue, ast.object.loc); // 6. Let propertyKey be ? ToPropertyKey(propertyNameValue). var propertyKey = _singletons.To.ToPropertyKeyPartial(realm, propertyNameValue); // 7. If the code matched by the syntactic production that is being evaluated is strict mode code, let strict be true, else let strict be false. var strict = strictCode; // 8. Return a value of type Reference whose base value is bv, whose referenced name is propertyKey, and whose strict reference flag is strict. return new _environment.Reference(bv, propertyKey, strict); }; var _environment = require("../environment.js"); var _index = require("../values/index.js"); var _index2 = require("../methods/index.js"); var _singletons = require("../singletons.js"); var _SuperProperty = require("./SuperProperty"); var _SuperProperty2 = _interopRequireDefault(_SuperProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } //# sourceMappingURL=MemberExpression.js.map