Commit d0cfc9bf authored by Benedikt Meurer's avatar Benedikt Meurer

[turbofan] Support inline receiver allocation for class constructors.

There's actually no need to restrict the inline allocation of
receivers for class constructors anymore; the relevant issues
were addressed in the compiler and runtime several weeks ago.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1532453004 .

Cr-Commit-Position: refs/heads/master@{#32925}
parent e0a3ff0f
......@@ -1411,8 +1411,9 @@ const int kMaxInlineInstanceSize = 64 * kPointerSize;
// Checks whether allocation using the given constructor can be inlined.
bool IsAllocationInlineable(Handle<JSFunction> constructor) {
// TODO(bmeurer): Support inlining of class constructors.
if (IsClassConstructor(constructor->shared()->kind())) return false;
// TODO(bmeurer): Further relax restrictions on inlining, i.e.
// instance type and maybe instance size (inobject properties
// are limited anyways by the runtime).
return constructor->has_initial_map() &&
constructor->initial_map()->instance_type() == JS_OBJECT_TYPE &&
constructor->initial_map()->instance_size() < kMaxInlineInstanceSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment