Commit 52cdf06b authored by Benedikt Meurer's avatar Benedikt Meurer

[turbofan] Address TODO now that Object constructor is a proper builtin.

Bug: v8:6772
Tbr: jarin@chromium.org
Change-Id: I48b21fbdec42d4b1c10800913f7fa222a5509a8d
Reviewed-on: https://chromium-review.googlesource.com/654873Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47897}
parent a2ed0514
......@@ -1341,12 +1341,6 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
// Don't inline cross native context.
if (function->native_context() != *native_context()) return NoChange();
// TODO(turbofan): Merge this into the switch below once the
// Object constructor is a proper TFJ builtin.
if (*function == native_context()->object_function()) {
return ReduceObjectConstructor(node);
}
// Check for known builtin functions.
switch (shared->code()->builtin_index()) {
case Builtins::kArrayConstructor:
......@@ -1361,6 +1355,8 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
return ReduceFunctionPrototypeHasInstance(node);
case Builtins::kNumberConstructor:
return ReduceNumberConstructor(node);
case Builtins::kObjectConstructor:
return ReduceObjectConstructor(node);
case Builtins::kObjectGetPrototypeOf:
return ReduceObjectGetPrototypeOf(node);
case Builtins::kObjectPrototypeGetProto:
......
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