In MA, threaded barrels and/or flash hiders count as an "evil feature" for the rifle portion of the AWB. Note that this applies ONLY to semi-automatic rifles. Manually operated (bolt, slide, lever, break, rolling block etc) rifles are NOT affected by the AWB.
It is also a pistol AWB feature, but most "normal" pistols will not have any other AWB features, so it's okay.
A threaded barrel/flash hider is NOT a shotgun AWB feature.
WRT semi-auto rifles, if your barrel has threads, a non-flash hiding muzzle device must be PERMANENTLY attached. This can be a thread cap, or a brake. Permanently attached means pinned and welded or soldered on with 1100* silver solder.
Silencers are illegal in MA with the exception of .gov agencies and manufacturers. If they were legal (or if you live in a state where they are), they are subject to NFA laws, and require an approved Form 1 or Form 4, and a $200 tax stamp.
ETA: This has, of course, been discussed a bunch of times. A perusal of the MA Law sub-forum might net what you're looking for.