Preheat an oven to 350 F. Butter a 9- by 12-inch glass baking dish.
Bring a large pot of water to a boil over high heat. Add the sweet potatoes and cook until soft, about 12 minutes. Drain the potatoes and transfer to a large bowl.
Add the butter and mash the potatoes with the butter. Stir in the flour, brown sugar, baking powder, cinnamon, nutmeg, allspice and 1 teaspoon salt until well blended.
Fold in the crushed pineapple and transfer to the prepared baking dish.
Bake until the sweet potatoes are brown on top, about 30 minutes.
Remove from the oven and place the marshmallows in a single layer on top.
Preheat the broiler and place the dish underneath the broiler to toast the marshmallows. Watch carefully as they will toast very fast!
