| Index: vm/object.cc
|
| ===================================================================
|
| --- vm/object.cc (revision 6972)
|
| +++ vm/object.cc (working copy)
|
| @@ -5483,14 +5483,13 @@
|
| }
|
|
|
|
|
| -RawInstructions* Instructions::New(intptr_t size) {
|
| +RawInstructions* Instructions::New(intptr_t size, Heap::Space space) {
|
| + ASSERT(space == Heap::kDartCode || space == Heap::kStubCode);
|
| const Class& instructions_class = Class::Handle(Object::instructions_class());
|
| Instructions& result = Instructions::Handle();
|
| {
|
| uword aligned_size = Instructions::InstanceSize(size);
|
| - RawObject* raw = Object::Allocate(instructions_class,
|
| - aligned_size,
|
| - Heap::kExecutable);
|
| + RawObject* raw = Object::Allocate(instructions_class, aligned_size, space);
|
| NoGCScope no_gc;
|
| result ^= raw;
|
| result.set_size(size);
|
| @@ -5911,12 +5910,14 @@
|
| }
|
|
|
|
|
| -RawCode* Code::FinalizeCode(const char* name, Assembler* assembler) {
|
| +RawCode* Code::FinalizeCode(const char* name,
|
| + Assembler* assembler,
|
| + Heap::Space space) {
|
| ASSERT(assembler != NULL);
|
|
|
| // Allocate the Instructions object.
|
| Instructions& instrs =
|
| - Instructions::ZoneHandle(Instructions::New(assembler->CodeSize()));
|
| + Instructions::ZoneHandle(Instructions::New(assembler->CodeSize(), space));
|
|
|
| // Copy the instructions into the instruction area and apply all fixups.
|
| // Embedded pointers are still in handles at this point.
|
| @@ -5978,6 +5979,16 @@
|
| }
|
|
|
|
|
| +RawCode* Code::FinalizeCode(const char* name, Assembler* assembler) {
|
| + return FinalizeCode(name, assembler, Heap::kDartCode);
|
| +}
|
| +
|
| +
|
| +RawCode* Code::FinalizeStubCode(const char* name, Assembler* assembler) {
|
| + return FinalizeCode(name, assembler, Heap::kStubCode);
|
| +}
|
| +
|
| +
|
| intptr_t Code::GetTokenIndexOfPC(uword pc) const {
|
| intptr_t token_index = -1;
|
| const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
|
|
|