@@ -905,8 +905,17 @@ Node* JSCreateLowering::AllocateFastLiteral(
905
905
site_context->ExitScope (current_site, boilerplate_object);
906
906
} else if (property_details.representation ().IsDouble ()) {
907
907
// 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 ()),
910
919
effect, control);
911
920
} else if (property_details.representation ().IsSmi ()) {
912
921
// Ensure that value is stored as smi.
@@ -1028,23 +1037,6 @@ Node* JSCreateLowering::AllocateFastLiteralElements(
1028
1037
return builder.Finish ();
1029
1038
}
1030
1039
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
-
1048
1040
MaybeHandle<LiteralsArray> JSCreateLowering::GetSpecializationLiterals (
1049
1041
Node* node) {
1050
1042
Node* const closure = NodeProperties::GetValueInput (node, 0 );
0 commit comments