WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157956
JSScope::abstractAccess doesn't need to copy the SymbolTableEntry, it can use it by reference
https://bugs.webkit.org/show_bug.cgi?id=157956
Summary
JSScope::abstractAccess doesn't need to copy the SymbolTableEntry, it can use...
Saam Barati
Reported
2016-05-20 14:39:31 PDT
Copying a FatEntry is slow because we have to malloc then free the FatEntry
Attachments
patch
(7.94 KB, patch)
2016-05-20 14:47 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(6.92 KB, patch)
2016-05-20 16:13 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(6.83 KB, patch)
2016-05-20 16:25 PDT
,
Saam Barati
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2016-05-20 14:47:08 PDT
Created
attachment 279502
[details]
patch
Geoffrey Garen
Comment 2
2016-05-20 14:51:52 PDT
Comment on
attachment 279502
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=279502&action=review
> Source/JavaScriptCore/runtime/JSScope.cpp:75 > + if (!entry.isNull()) { > + op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, 0, lexicalEnvironment, entry.watchpointSet(), entry.scopeOffset().offset()); > return true; > } > + > + if (scope->type() == ModuleEnvironmentType) {
I think this logic changed. entry.isNull() is only possible in the get() world. In the find world, the equivalent is iter == end(). So, I think the return above needs to be unconditional, and this module code needs to be outside the iter != end() check.
Saam Barati
Comment 3
2016-05-20 16:03:21 PDT
(In reply to
comment #2
)
> Comment on
attachment 279502
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=279502&action=review
> > > Source/JavaScriptCore/runtime/JSScope.cpp:75 > > + if (!entry.isNull()) { > > + op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, 0, lexicalEnvironment, entry.watchpointSet(), entry.scopeOffset().offset()); > > return true; > > } > > + > > + if (scope->type() == ModuleEnvironmentType) { > > I think this logic changed. > > entry.isNull() is only possible in the get() world. In the find world, the > equivalent is iter == end(). So, I think the return above needs to be > unconditional, and this module code needs to be outside the iter != end() > check.
Good catch. In general, my change assumes that the following could be true: (iter != end() && entry.isNull()) I think this is a bad assumption though. I believe that (iter != end()) implies (!entry.isNull())
Saam Barati
Comment 4
2016-05-20 16:13:16 PDT
Created
attachment 279512
[details]
patch
WebKit Commit Bot
Comment 5
2016-05-20 16:14:26 PDT
Attachment 279512
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/JSScope.cpp:62: An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement. [readability/control_flow] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 6
2016-05-20 16:25:23 PDT
Created
attachment 279513
[details]
patch fix style
Geoffrey Garen
Comment 7
2016-05-20 16:32:14 PDT
Comment on
attachment 279513
[details]
patch r=me
Saam Barati
Comment 8
2016-05-20 17:16:44 PDT
landed in:
http://trac.webkit.org/changeset/201235
Csaba Osztrogonác
Comment 9
2016-05-22 13:12:41 PDT
(In reply to
comment #8
)
> landed in: >
http://trac.webkit.org/changeset/201235
It made 300 tests assert on all debug bots, see build.webkit.org for details.
Saam Barati
Comment 10
2016-05-22 15:30:24 PDT
(In reply to
comment #9
)
> (In reply to
comment #8
) > > landed in: > >
http://trac.webkit.org/changeset/201235
> > It made 300 tests assert on all debug bots, see build.webkit.org for details.
Thanks. I'm looking into it now.
Saam Barati
Comment 11
2016-05-22 15:39:34 PDT
I'm pretty sure I've found the bug.
Saam Barati
Comment 12
2016-05-22 16:02:10 PDT
(In reply to
comment #11
)
> I'm pretty sure I've found the bug.
Running debug tests locally now
Saam Barati
Comment 13
2016-05-22 21:01:47 PDT
(In reply to
comment #12
)
> (In reply to
comment #11
) > > I'm pretty sure I've found the bug. > > Running debug tests locally now
Fixed debug assertion failures in:
http://trac.webkit.org/changeset/201266
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug