lgtm with suggestion:

https://codereview.chromium.org/270573003/diff/20001/src/factory.cc
File src/factory.cc (right):

https://codereview.chromium.org/270573003/diff/20001/src/factory.cc#newcode1206
src/factory.cc:1206: Handle<SharedFunctionInfo> info) {
I think you could simplify constructors even more if you
1) replace Handle<SharedFunctionInfo> parameter with Handle<Name> and
MaybeHandle<Code>,
2) extend NewShareFunctionInfo() with optional MaybeHandle<Code>
parameter,
3) create share info here,
4) and add
  ASSERT((info->strict_mode() == SLOPPY) &&
         ((*map == *isolate()->sloppy_function_map()) ||
          (*map ==
*isolate()->sloppy_function_without_prototype_map()));

https://codereview.chromium.org/270573003/diff/20001/src/factory.cc#newcode1215
src/factory.cc:1215: return
NewFunction(isolate()->sloppy_function_map(), info);
... then this would be just:
return NewFunction(NewFunction(isolate()->sloppy_function_map(), name,
MaybeHandle<Code>());

https://codereview.chromium.org/270573003/diff/20001/src/factory.cc#newcode1225
src/factory.cc:1225: return NewFunction(map, info);
... this method will look like:
return NewFunction(isolate()->sloppy_function_without_prototype_map(),
name, code);

https://codereview.chromium.org/270573003/diff/20001/src/factory.cc#newcode1236
src/factory.cc:1236: Handle<JSFunction> result = NewFunction(map, info);
... and this method will look like:
Handle<JSFunction> result =
NewFunction(isolate()->sloppy_function_map(), name, code);
result->set_prototype_or_initial_map(*prototype);
return result;

https://codereview.chromium.org/270573003/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to