Title: [206671] trunk/Source/_javascript_Core
- Revision
- 206671
- Author
- [email protected]
- Date
- 2016-09-30 14:23:34 -0700 (Fri, 30 Sep 2016)
Log Message
Fix modules tests after r206653 handle breakpoint locations in import/export statements
https://bugs.webkit.org/show_bug.cgi?id=162807
Reviewed by Mark Lam.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createExportDefaultDeclaration):
(JSC::ASTBuilder::createExportLocalDeclaration):
Don't record an extra breakpoint location for the statement
within an export statement.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseModuleSourceElements):
Record a pause location for import/export statements.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (206670 => 206671)
--- trunk/Source/_javascript_Core/ChangeLog 2016-09-30 21:19:41 UTC (rev 206670)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-09-30 21:23:34 UTC (rev 206671)
@@ -1,3 +1,20 @@
+2016-09-30 Joseph Pecoraro <[email protected]>
+
+ Fix modules tests after r206653 handle breakpoint locations in import/export statements
+ https://bugs.webkit.org/show_bug.cgi?id=162807
+
+ Reviewed by Mark Lam.
+
+ * parser/ASTBuilder.h:
+ (JSC::ASTBuilder::createExportDefaultDeclaration):
+ (JSC::ASTBuilder::createExportLocalDeclaration):
+ Don't record an extra breakpoint location for the statement
+ within an export statement.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseModuleSourceElements):
+ Record a pause location for import/export statements.
+
2016-09-30 Mark Lam <[email protected]>
Remove the dumping of the stack back trace in VM::verifyExceptionCheckNeedIsSatisfied().
Modified: trunk/Source/_javascript_Core/parser/ASTBuilder.h (206670 => 206671)
--- trunk/Source/_javascript_Core/parser/ASTBuilder.h 2016-09-30 21:19:41 UTC (rev 206670)
+++ trunk/Source/_javascript_Core/parser/ASTBuilder.h 2016-09-30 21:23:34 UTC (rev 206671)
@@ -752,11 +752,21 @@
StatementNode* createExportDefaultDeclaration(const JSTokenLocation& location, StatementNode* declaration, const Identifier& localName)
{
+ // We need to mark the inner statement as needing a debug hook (so that when the statement is generated we don't
+ // assert when generating an op_debug for it) without recording a breakpoint location because the export statement
+ // itself will get the breakpoint location. This will be eliminated by:
+ // <https://webkit.org/b/162809> Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits
+ declaration->setNeedsDebugHook();
return new (m_parserArena) ExportDefaultDeclarationNode(location, declaration, localName);
}
StatementNode* createExportLocalDeclaration(const JSTokenLocation& location, StatementNode* declaration)
{
+ // We need to mark the inner statement as needing a debug hook (so that when the statement is generated we don't
+ // assert when generating an op_debug for it) without recording a breakpoint location because the export statement
+ // itself will get the breakpoint location. This will be eliminated by:
+ // <https://webkit.org/b/162809> Emit DebugHooks uniformly with pause locations instead of having separate pause locations and op_debug emits
+ declaration->setNeedsDebugHook();
return new (m_parserArena) ExportLocalDeclarationNode(location, declaration);
}
Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (206670 => 206671)
--- trunk/Source/_javascript_Core/parser/Parser.cpp 2016-09-30 21:19:41 UTC (rev 206670)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp 2016-09-30 21:23:34 UTC (rev 206671)
@@ -459,11 +459,15 @@
while (true) {
TreeStatement statement = 0;
- if (match(IMPORT))
+ if (match(IMPORT)) {
statement = parseImportDeclaration(context);
- else if (match(EXPORT))
+ if (statement)
+ recordPauseLocation(context.breakpointLocation(statement));
+ } else if (match(EXPORT)) {
statement = parseExportDeclaration(context);
- else {
+ if (statement)
+ recordPauseLocation(context.breakpointLocation(statement));
+ } else {
const Identifier* directive = 0;
unsigned directiveLiteralLength = 0;
if (parseMode == SourceParseMode::ModuleAnalyzeMode) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes