| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #include "src/vm/program_info_block.h" | 5 #include "src/vm/program_info_block.h" |
| 6 | 6 |
| 7 namespace fletch { | 7 namespace dartino { |
| 8 | 8 |
| 9 class PointerReadingVisitor : public PointerVisitor { | 9 class PointerReadingVisitor : public PointerVisitor { |
| 10 public: | 10 public: |
| 11 explicit PointerReadingVisitor(ProgramInfoBlock* info) | 11 explicit PointerReadingVisitor(ProgramInfoBlock* info) |
| 12 : | 12 : |
| 13 #ifdef DEBUG | 13 #ifdef DEBUG |
| 14 info_(info), | 14 info_(info), |
| 15 #endif | 15 #endif |
| 16 target_(info->roots()) { | 16 target_(info->roots()) { |
| 17 } | 17 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 set_main_arity(program->main_arity()); | 74 set_main_arity(program->main_arity()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void ProgramInfoBlock::WriteToProgram(Program* program) { | 77 void ProgramInfoBlock::WriteToProgram(Program* program) { |
| 78 ASSERT(program->session() == NULL); | 78 ASSERT(program->session() == NULL); |
| 79 PointerWritingVisitor writer(this); | 79 PointerWritingVisitor writer(this); |
| 80 program->IterateRoots(&writer); | 80 program->IterateRoots(&writer); |
| 81 program->set_main_arity(main_arity()); | 81 program->set_main_arity(main_arity()); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace fletch | 84 } // namespace dartino |
| OLD | NEW |