@@ -905,8 +905,17 @@ Node* JSCreateLowering::AllocateFastLiteral(
905905 site_context->ExitScope (current_site, boilerplate_object);
906906 } else if (property_details.representation ().IsDouble ()) {
907907 // Allocate a mutable HeapNumber box and store the value into it.
908- value = effect = AllocateMutableHeapNumber (
909- Handle<HeapNumber>::cast (boilerplate_value)->value (),
908+ Callable callable = CodeFactory::AllocateMutableHeapNumber (isolate ());
909+ CallDescriptor* desc = Linkage::GetStubCallDescriptor (
910+ isolate (), jsgraph ()->zone (), callable.descriptor (), 0 ,
911+ CallDescriptor::kNoFlags , Operator::kNoThrow );
912+ value = effect = graph ()->NewNode (
913+ common ()->Call (desc), jsgraph ()->HeapConstant (callable.code ()),
914+ jsgraph ()->NoContextConstant (), effect, control);
915+ effect = graph ()->NewNode (
916+ simplified ()->StoreField (AccessBuilder::ForHeapNumberValue ()),
917+ value, jsgraph ()->Constant (
918+ Handle<HeapNumber>::cast (boilerplate_value)->value ()),
910919 effect, control);
911920 } else if (property_details.representation ().IsSmi ()) {
912921 // Ensure that value is stored as smi.
@@ -1028,23 +1037,6 @@ Node* JSCreateLowering::AllocateFastLiteralElements(
10281037 return builder.Finish ();
10291038}
10301039
1031- Node* JSCreateLowering::AllocateMutableHeapNumber (double value, Node* effect,
1032- Node* control) {
1033- // TODO(turbofan): Support inline allocation of MutableHeapNumber
1034- // (requires proper alignment on Allocate, and Begin/FinishRegion).
1035- Callable callable = CodeFactory::AllocateMutableHeapNumber (isolate ());
1036- CallDescriptor* desc = Linkage::GetStubCallDescriptor (
1037- isolate (), jsgraph ()->zone (), callable.descriptor (), 0 ,
1038- CallDescriptor::kNoFlags , Operator::kNoThrow );
1039- Node* result = effect = graph ()->NewNode (
1040- common ()->Call (desc), jsgraph ()->HeapConstant (callable.code ()),
1041- jsgraph ()->NoContextConstant (), effect, control);
1042- effect = graph ()->NewNode (
1043- simplified ()->StoreField (AccessBuilder::ForHeapNumberValue ()), result,
1044- jsgraph ()->Constant (value), effect, control);
1045- return result;
1046- }
1047-
10481040MaybeHandle<LiteralsArray> JSCreateLowering::GetSpecializationLiterals (
10491041 Node* node) {
10501042 Node* const closure = NodeProperties::GetValueInput (node, 0 );
0 commit comments