merge stack_depth into assemble