| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
| 10 #include "vm/bigint_store.h" | 10 #include "vm/bigint_store.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 ASSERT(long_jump_base() != NULL); | 239 ASSERT(long_jump_base() != NULL); |
| 240 ASSERT(post_message_callback() == &StandardPostMessageCallback); | 240 ASSERT(post_message_callback() == &StandardPostMessageCallback); |
| 241 ASSERT(close_port_callback() == &StandardClosePortCallback); | 241 ASSERT(close_port_callback() == &StandardClosePortCallback); |
| 242 | 242 |
| 243 while (active_ports() > 0) { | 243 while (active_ports() > 0) { |
| 244 Zone zone; | 244 Zone zone; |
| 245 HandleScope handle_scope; | 245 HandleScope handle_scope; |
| 246 | 246 |
| 247 PortMessage* message = message_queue()->Dequeue(0); | 247 PortMessage* message = message_queue()->Dequeue(0); |
| 248 if (message != NULL) { | 248 if (message != NULL) { |
| 249 Dart_HandleMessage( | 249 Dart_Handle result = Dart_HandleMessage( |
| 250 message->dest_port(), message->reply_port(), message->data()); | 250 message->dest_port(), message->reply_port(), message->data()); |
| 251 if (Dart_IsError(result)) { |
| 252 fprintf(stderr, "%s\n", Dart_GetError(result)); |
| 253 exit(255); |
| 254 } |
| 251 delete message; | 255 delete message; |
| 252 } | 256 } |
| 253 } | 257 } |
| 254 } | 258 } |
| 255 | 259 |
| 256 | 260 |
| 257 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor, | 261 void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor, |
| 258 bool validate_frames) { | 262 bool validate_frames) { |
| 259 ASSERT(visitor != NULL); | 263 ASSERT(visitor != NULL); |
| 260 | 264 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 283 // Visit all objects in the code index table. | 287 // Visit all objects in the code index table. |
| 284 if (code_index_table() != NULL) { | 288 if (code_index_table() != NULL) { |
| 285 code_index_table()->VisitObjectPointers(visitor); | 289 code_index_table()->VisitObjectPointers(visitor); |
| 286 } | 290 } |
| 287 | 291 |
| 288 // Visit the top context which is stored in the isolate. | 292 // Visit the top context which is stored in the isolate. |
| 289 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | 293 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); |
| 290 } | 294 } |
| 291 | 295 |
| 292 } // namespace dart | 296 } // namespace dart |
| OLD | NEW |