| OLD | NEW |
| 1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Fletch 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/session.h" | 5 #include "src/vm/session.h" |
| 6 | 6 |
| 7 #include "src/shared/bytecodes.h" | 7 #include "src/shared/bytecodes.h" |
| 8 #include "src/shared/connection.h" | 8 #include "src/shared/connection.h" |
| 9 #include "src/shared/flags.h" | 9 #include "src/shared/flags.h" |
| 10 | 10 |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } else if (name == Names::kConstantMap) { | 759 } else if (name == Names::kConstantMap) { |
| 760 klass = program()->constant_map_class(); | 760 klass = program()->constant_map_class(); |
| 761 } else if (name == Names::kNum) { | 761 } else if (name == Names::kNum) { |
| 762 klass = program()->num_class(); | 762 klass = program()->num_class(); |
| 763 } else if (name == Names::kString) { | 763 } else if (name == Names::kString) { |
| 764 klass = program()->string_class(); | 764 klass = program()->string_class(); |
| 765 } else if (name == Names::kCoroutine) { | 765 } else if (name == Names::kCoroutine) { |
| 766 klass = program()->coroutine_class(); | 766 klass = program()->coroutine_class(); |
| 767 } else if (name == Names::kPort) { | 767 } else if (name == Names::kPort) { |
| 768 klass = program()->port_class(); | 768 klass = program()->port_class(); |
| 769 } else if (name == Names::kForeign) { | 769 } else if (name == Names::kForeignMemory) { |
| 770 klass = program()->foreign_class(); | 770 klass = program()->foreignmemory_class(); |
| 771 } else if (name == Names::kForeignFunction) { |
| 772 klass = program()->foreignfunction_class(); |
| 771 } else { | 773 } else { |
| 774 printf("name: %d, %d", name, Names::kForeignFunction); |
| 772 UNREACHABLE(); | 775 UNREACHABLE(); |
| 773 } | 776 } |
| 774 | 777 |
| 778 if (!(klass->instance_format().type() != InstanceFormat::INSTANCE_TYPE || |
| 779 klass->NumberOfInstanceFields() == fields)) { |
| 780 printf("Numberof fields: %d %d", klass->NumberOfInstanceFields(), fields); |
| 781 } |
| 775 ASSERT(klass->instance_format().type() != InstanceFormat::INSTANCE_TYPE || | 782 ASSERT(klass->instance_format().type() != InstanceFormat::INSTANCE_TYPE || |
| 776 klass->NumberOfInstanceFields() == fields); | 783 klass->NumberOfInstanceFields() == fields); |
| 777 | 784 |
| 778 Push(klass); | 785 Push(klass); |
| 779 } | 786 } |
| 780 | 787 |
| 781 void Session::PushConstantList(int length) { | 788 void Session::PushConstantList(int length) { |
| 782 PushNewArray(length); | 789 PushNewArray(length); |
| 783 GC_AND_RETRY_ON_ALLOCATION_FAILURE( | 790 GC_AND_RETRY_ON_ALLOCATION_FAILURE( |
| 784 result, | 791 result, |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 // heaps; they need to be visited as well. See Program::CollectGarbage for | 1079 // heaps; they need to be visited as well. See Program::CollectGarbage for |
| 1073 // how it is done there. | 1080 // how it is done there. |
| 1074 // Issue: https://github.com/dart-lang/fletch/issues/51 | 1081 // Issue: https://github.com/dart-lang/fletch/issues/51 |
| 1075 TransformInstancesProcessVisitor process_visitor; | 1082 TransformInstancesProcessVisitor process_visitor; |
| 1076 Scheduler* scheduler = program()->scheduler(); | 1083 Scheduler* scheduler = program()->scheduler(); |
| 1077 VisitProcesses(&process_visitor); | 1084 VisitProcesses(&process_visitor); |
| 1078 scheduler->VisitProcesses(program(), &process_visitor); | 1085 scheduler->VisitProcesses(program(), &process_visitor); |
| 1079 } | 1086 } |
| 1080 | 1087 |
| 1081 } // namespace fletch | 1088 } // namespace fletch |
| OLD | NEW |