| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 strtmp = DartLibraryCalls::ToString(stack); | 118 strtmp = DartLibraryCalls::ToString(stack); |
| 119 str = strtmp.ToCString(); | 119 str = strtmp.ToCString(); |
| 120 fprintf(stderr, "%s\n", str); | 120 fprintf(stderr, "%s\n", str); |
| 121 exit(255); | 121 exit(255); |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 DART_EXPORT void Dart_HandleMessage(Dart_Port dest_port, | 125 DART_EXPORT void Dart_HandleMessage(Dart_Port dest_port, |
| 126 Dart_Port reply_port, | 126 Dart_Port reply_port, |
| 127 Dart_Message dart_message) { | 127 Dart_Message dart_message) { |
| 128 Zone zone; // Setup a VM zone as we are creating some handles. |
| 129 HandleScope scope; // Setup a VM handle scope. |
| 128 const Instance& msg = Instance::Handle(DeserializeMessage(dart_message)); | 130 const Instance& msg = Instance::Handle(DeserializeMessage(dart_message)); |
| 129 const String& class_name = | 131 const String& class_name = |
| 130 String::Handle(String::NewSymbol("ReceivePortImpl")); | 132 String::Handle(String::NewSymbol("ReceivePortImpl")); |
| 131 const String& function_name = | 133 const String& function_name = |
| 132 String::Handle(String::NewSymbol("handleMessage_")); | 134 String::Handle(String::NewSymbol("handleMessage_")); |
| 133 const int kNumArguments = 3; | 135 const int kNumArguments = 3; |
| 134 const Array& kNoArgumentNames = Array::Handle(); | 136 const Array& kNoArgumentNames = Array::Handle(); |
| 135 const Function& function = Function::Handle( | 137 const Function& function = Function::Handle( |
| 136 Resolver::ResolveStatic(Library::Handle(Library::CoreLibrary()), | 138 Resolver::ResolveStatic(Library::Handle(Library::CoreLibrary()), |
| 137 class_name, | 139 class_name, |
| (...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 ASSERT(isolate != NULL); | 1673 ASSERT(isolate != NULL); |
| 1672 ApiState* state = isolate->api_state(); | 1674 ApiState* state = isolate->api_state(); |
| 1673 ASSERT(state != NULL); | 1675 ASSERT(state != NULL); |
| 1674 ApiLocalScope* scope = state->top_scope(); | 1676 ApiLocalScope* scope = state->top_scope(); |
| 1675 ASSERT(scope != NULL); | 1677 ASSERT(scope != NULL); |
| 1676 return scope->zone().Reallocate(ptr, old_size, new_size); | 1678 return scope->zone().Reallocate(ptr, old_size, new_size); |
| 1677 } | 1679 } |
| 1678 | 1680 |
| 1679 | 1681 |
| 1680 } // namespace dart | 1682 } // namespace dart |
| OLD | NEW |