Landing...
On 2012/11/15 21:24:25, Michael Starzinger wrote:
> Use the handle constructor, that's easier to read I think.
> Handle<Object> instance_template(desc->instance_template(),
isolate());
Done. In general I like the proposed direct initialization much more,
too, because it is conceptually simpler: It is similar to a normal
function call with the usual overloading resolution, just for
constructors. The previous code uses copy initialization, which is much
more tricky: Conceptually it tries to create a temporary of the type of
the LHS (possibly involving conversion functions/operators) and uses a
copy constructor to move the values into the LHS. Luckily enough, GCC is
clever enough to avoid the intermediate steps, but why should we make
things more complicated than necessary? :-)
On 2012/11/15 21:24:25, Michael Starzinger wrote:
> I know this isn't your change, it must be something pretty recent. But
I really
> don't like this maybe-handle pattern. The following is much easier to
read and
> doesn't need an explicit isolate parameter.
> Handle<TypeFeedbackInfo> type_info(
> TypeFeedbackInfo::cast(unoptimized_code->type_feedback_info()));
Done.
On 2012/11/15 21:24:25, Michael Starzinger wrote:
> Likewise.
Done.
On 2012/11/15 21:24:25, Michael Starzinger wrote:
> Just use "Handle<String> empty_string =
isolate->factory()->empty_string();"
> here, saves the handle allocation completely.
Done.
https://codereview.chromium.org/11412007/