| 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" |
| 11 #include "vm/dart_api_impl.h" | 11 #include "vm/dart_api_impl.h" |
| 12 #include "vm/dart_api_state.h" | 12 #include "vm/dart_api_state.h" |
| 13 #include "vm/dart_entry.h" | 13 #include "vm/dart_entry.h" |
| 14 #include "vm/debugger.h" |
| 14 #include "vm/debuginfo.h" | 15 #include "vm/debuginfo.h" |
| 15 #include "vm/exceptions.h" | 16 #include "vm/exceptions.h" |
| 16 #include "vm/growable_array.h" | 17 #include "vm/growable_array.h" |
| 17 #include "vm/longjump.h" | 18 #include "vm/longjump.h" |
| 18 #include "vm/native_entry.h" | 19 #include "vm/native_entry.h" |
| 19 #include "vm/object.h" | 20 #include "vm/object.h" |
| 20 #include "vm/object_store.h" | 21 #include "vm/object_store.h" |
| 21 #include "vm/port.h" | 22 #include "vm/port.h" |
| 22 #include "vm/resolver.h" | 23 #include "vm/resolver.h" |
| 23 #include "vm/snapshot.h" | 24 #include "vm/snapshot.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // which shows up because of the use of setjmp. | 91 // which shows up because of the use of setjmp. |
| 91 static void InvokeStatic(Isolate* isolate, | 92 static void InvokeStatic(Isolate* isolate, |
| 92 const Function& function, | 93 const Function& function, |
| 93 GrowableArray<const Object*>& args, | 94 GrowableArray<const Object*>& args, |
| 94 Dart_Handle* result) { | 95 Dart_Handle* result) { |
| 95 ASSERT(isolate != NULL); | 96 ASSERT(isolate != NULL); |
| 96 LongJump* base = isolate->long_jump_base(); | 97 LongJump* base = isolate->long_jump_base(); |
| 97 LongJump jump; | 98 LongJump jump; |
| 98 isolate->set_long_jump_base(&jump); | 99 isolate->set_long_jump_base(&jump); |
| 99 if (setjmp(*jump.Set()) == 0) { | 100 if (setjmp(*jump.Set()) == 0) { |
| 101 isolate->debugger()->Initialize(isolate); |
| 100 const Array& kNoArgumentNames = Array::Handle(); | 102 const Array& kNoArgumentNames = Array::Handle(); |
| 101 const Instance& retval = Instance::Handle( | 103 const Instance& retval = Instance::Handle( |
| 102 DartEntry::InvokeStatic(function, args, kNoArgumentNames)); | 104 DartEntry::InvokeStatic(function, args, kNoArgumentNames)); |
| 103 if (retval.IsUnhandledException()) { | 105 if (retval.IsUnhandledException()) { |
| 104 *result = Api::ErrorFromException(retval); | 106 *result = Api::ErrorFromException(retval); |
| 105 } else { | 107 } else { |
| 106 *result = Api::NewLocalHandle(retval); | 108 *result = Api::NewLocalHandle(retval); |
| 107 } | 109 } |
| 108 } else { | 110 } else { |
| 109 SetupErrorResult(result); | 111 SetupErrorResult(result); |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2359 } | 2361 } |
| 2360 delete debug_region; | 2362 delete debug_region; |
| 2361 } else { | 2363 } else { |
| 2362 *buffer = NULL; | 2364 *buffer = NULL; |
| 2363 *buffer_size = 0; | 2365 *buffer_size = 0; |
| 2364 } | 2366 } |
| 2365 } | 2367 } |
| 2366 | 2368 |
| 2367 | 2369 |
| 2368 } // namespace dart | 2370 } // namespace dart |
| OLD | NEW |