Chromium Code Reviews| Index: src/compiler/js-typed-lowering.cc |
| diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
| index e9a6fec08894e7a1f8204bd42787d11a181fd065..7724e0499fc85ea23a4ebe7c04a2a5dcd2e5176f 100644 |
| --- a/src/compiler/js-typed-lowering.cc |
| +++ b/src/compiler/js-typed-lowering.cc |
| @@ -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). |
|
Toon Verwaest
2015/12/16 20:00:47
DBC: Don't you only want to allow it for base clas
Benedikt Meurer
2015/12/16 20:29:07
You already answered the question. I'm currently w
|
| return constructor->has_initial_map() && |
| constructor->initial_map()->instance_type() == JS_OBJECT_TYPE && |
| constructor->initial_map()->instance_size() < kMaxInlineInstanceSize; |