[webkit-reviews] review denied: [Bug 133395] Web Inspector: debugger should be able to show variable types : [Attachment 233743] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 24 15:21:42 PDT 2014

Filip Pizlo <fpizlo at apple.com> has denied Saam Barati <sbarati at apple.com>'s
request for review:
Bug 133395: Web Inspector: debugger should be able to show variable types

Attachment 233743: patch

------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=233743&action=review

> Source/JavaScriptCore/runtime/HighFidelityLog.h:39
> +    class TypeLocation;

Unindent this.

> Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h:48
> +    typedef HashMap<String, RefPtr<TypeSet>> GlobalLocationMap; // (for now,
hack it and say Map:"ID:Line" => TypeSet. Obviously, this assumes all
assignments are on discrete lines).

This is pretty shady.  The key should be a struct.  Since that takes effort and
this code uses few cycles, you can use std::unordered_map.

> Source/JavaScriptCore/runtime/HighFidelityTypeProfiler.h:50
> +    typedef HashMap<String, int64_t> GlobalLocationToGlobalIDMap;


> Source/JavaScriptCore/runtime/Structure.cpp:1071
> +	   for (; iter != end; ++iter) {
> +	       shape->addProperty(iter->key);
> +	   }

No need for { and } if the body is just one line.  You can just say:

for (; iter != end; ++iter)

More information about the webkit-reviews mailing list