d6178535b2
Change executable pages to be read/execute but not writable by default. All pages are made temporarily writable just before a full GC, because both the mark and sweep phases write to the pages. When allocating in a page and when patching code, the pages are made temporarily writable. The order of allocation of Code and Instructions objects is changed so that a GC will not occur after Instructions is allocated. (A full GC would render the Instructions unwritable.) A scoped object is used to make memory protection simpler. Original CL: https://codereview.chromium.org/106593002/ I added a cc test that is expected to crash. R=srdjan@google.com Review URL: https://codereview.chromium.org//136563002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32493 260f80e4-7a28-3924-810f-c04153c831b5