| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 result = state->ResolveFunction(); | 366 result = state->ResolveFunction(); |
| 367 delete state; | 367 delete state; |
| 368 state = NULL; | 368 state = NULL; |
| 369 if (result.IsError()) { | 369 if (result.IsError()) { |
| 370 StoreError(isolate, result); | 370 StoreError(isolate, result); |
| 371 return false; | 371 return false; |
| 372 } | 372 } |
| 373 ASSERT(result.IsFunction()); | 373 ASSERT(result.IsFunction()); |
| 374 Function& func = Function::Handle(isolate); | 374 Function& func = Function::Handle(isolate); |
| 375 func ^= result.raw(); | 375 func ^= result.raw(); |
| 376 const Array& args = Array::Handle(Object::empty_array()); | 376 result = DartEntry::InvokeStatic(func, Object::empty_array()); |
| 377 result = DartEntry::InvokeStatic(func, args); | |
| 378 if (result.IsError()) { | 377 if (result.IsError()) { |
| 379 StoreError(isolate, result); | 378 StoreError(isolate, result); |
| 380 return false; | 379 return false; |
| 381 } | 380 } |
| 382 } | 381 } |
| 383 return true; | 382 return true; |
| 384 } | 383 } |
| 385 | 384 |
| 386 | 385 |
| 387 static RawObject* Spawn(NativeArguments* arguments, SpawnState* state) { | 386 static RawObject* Spawn(NativeArguments* arguments, SpawnState* state) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 486 |
| 488 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { | 487 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { |
| 489 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); | 488 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); |
| 490 if (port.IsError()) { | 489 if (port.IsError()) { |
| 491 Exceptions::PropagateError(Error::Cast(port)); | 490 Exceptions::PropagateError(Error::Cast(port)); |
| 492 } | 491 } |
| 493 return port.raw(); | 492 return port.raw(); |
| 494 } | 493 } |
| 495 | 494 |
| 496 } // namespace dart | 495 } // namespace dart |
| OLD | NEW |