| Summary: | Watchpoints should be allocated with FastMalloc | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||
| Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | barraclough, basile_clement, benjamin, ggaren, mark.lam, mhahnenb, mmirman, msaboff, nrotem, oliver, saam, sam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Filip Pizlo
2015-07-10 22:46:39 PDT
Created attachment 256645 [details]
the patch
Comment on attachment 256645 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=256645&action=review > Source/JavaScriptCore/bytecode/CodeBlockJettisoningWatchpoint.h:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. Oops, I'll revert. I just deleted code. Landed in http://trac.webkit.org/changeset/186705 Comment on attachment 256645 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=256645&action=review > Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.h:95 > typename HashSet<WatchpointSetType*>::iterator iter = m_sets.begin(); > typename HashSet<WatchpointSetType*>::iterator end = m_sets.end(); > - for (; iter != end; ++iter) { > - common.watchpoints.append(CodeBlockJettisoningWatchpoint(codeBlock)); > - Adaptor::add(codeBlock, *iter, &common.watchpoints.last()); > - } > + for (; iter != end; ++iter) > + Adaptor::add(codeBlock, *iter, common.watchpoints.add(codeBlock)); Here’s another way to write this: for (auto* set : m_sets) Adaptor::add(codeBlock, set, common.watchpoints.add(codeBlock)); I think the modern for loop makes this code look clearer. Comment on attachment 256645 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=256645&action=review >> Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.h:95 >> + Adaptor::add(codeBlock, *iter, common.watchpoints.add(codeBlock)); > > Here’s another way to write this: > > for (auto* set : m_sets) > Adaptor::add(codeBlock, set, common.watchpoints.add(codeBlock)); > > I think the modern for loop makes this code look clearer. Just noticed you did a variation on that in your very next patch. Never mind! |