Changeset 242193 in webkit
- Timestamp:
- Feb 27, 2019 10:44:15 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r242192 r242193 1 2019-02-27 Mark Lam <mark.lam@apple.com> 2 3 The parser is failing to record the token location of new in new.target. 4 https://bugs.webkit.org/show_bug.cgi?id=195127 5 <rdar://problem/39645578> 6 7 Reviewed by Yusuke Suzuki. 8 9 * stress/parser-should-record-token-location-of-new-dot-target.js: Added. 10 1 11 2019-02-27 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r242192 r242193 1 2019-02-27 Mark Lam <mark.lam@apple.com> 2 3 The parser is failing to record the token location of new in new.target. 4 https://bugs.webkit.org/show_bug.cgi?id=195127 5 <rdar://problem/39645578> 6 7 Reviewed by Yusuke Suzuki. 8 9 Also adjust the token location for the following to be as shown: 10 11 new.target 12 ^ 13 super 14 ^ 15 import.meta 16 ^ 17 18 * parser/Parser.cpp: 19 (JSC::Parser<LexerType>::parseMemberExpression): 20 1 21 2019-02-27 Yusuke Suzuki <ysuzuki@apple.com> 2 22 -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r241201 r242193 2 2 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) 3 3 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 4 * Copyright (C) 2003 , 2006-2010, 2013, 2016Apple Inc. All rights reserved.4 * Copyright (C) 2003-2019 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 4675 4675 int newCount = 0; 4676 4676 JSTokenLocation startLocation = tokenLocation(); 4677 JSTokenLocation l ocation;4677 JSTokenLocation lastNewTokenLocation; 4678 4678 while (match(NEW)) { 4679 lastNewTokenLocation = tokenLocation(); 4679 4680 next(); 4680 4681 newCount++; 4681 4682 } 4683 JSTokenLocation location = tokenLocation(); 4682 4684 4683 4685 bool baseIsSuper = match(SUPER); … … 4697 4699 currentScope()->setInnerArrowFunctionUsesNewTarget(); 4698 4700 } 4699 base = context.createNewTargetExpr(location); 4701 ASSERT(lastNewTokenLocation.line); 4702 base = context.createNewTargetExpr(lastNewTokenLocation); 4700 4703 newCount--; 4701 4704 next(); … … 4731 4734 if (matchContextualKeyword(m_vm->propertyNames->builtinNames().metaPublicName())) { 4732 4735 semanticFailIfFalse(m_scriptMode == JSParserScriptMode::Module, "import.meta is only valid inside modules"); 4733 4734 JSTokenLocation location(tokenLocation());4735 4736 base = context.createImportMetaExpr(location, createResolveAndUseVariable(context, &m_vm->propertyNames->metaPrivateName, false, expressionStart, location)); 4736 4737 next();
Note: See TracChangeset
for help on using the changeset viewer.