| 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/dart_entry.h" | 5 #include "vm/dart_entry.h" |
| 6 | 6 |
| 7 #include "vm/code_generator.h" | 7 #include "vm/code_generator.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 StubCode::InvokeDartCodeEntryPoint()); | 54 StubCode::InvokeDartCodeEntryPoint()); |
| 55 const Code& code = Code::Handle(function.CurrentCode()); | 55 const Code& code = Code::Handle(function.CurrentCode()); |
| 56 ASSERT(!code.IsNull()); | 56 ASSERT(!code.IsNull()); |
| 57 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); | 57 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); |
| 58 #if defined(USING_SIMULATOR) | 58 #if defined(USING_SIMULATOR) |
| 59 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( | 59 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( |
| 60 reinterpret_cast<int32_t>(entrypoint), | 60 reinterpret_cast<int32_t>(entrypoint), |
| 61 static_cast<int32_t>(code.EntryPoint()), | 61 static_cast<int32_t>(code.EntryPoint()), |
| 62 reinterpret_cast<int32_t>(&arguments_descriptor), | 62 reinterpret_cast<int32_t>(&arguments_descriptor), |
| 63 reinterpret_cast<int32_t>(&arguments), | 63 reinterpret_cast<int32_t>(&arguments), |
| 64 reinterpret_cast<int32_t>(&context), | 64 reinterpret_cast<int32_t>(&context))); |
| 65 0)); | |
| 66 #else | 65 #else |
| 67 return entrypoint(code.EntryPoint(), | 66 return entrypoint(code.EntryPoint(), |
| 68 arguments_descriptor, | 67 arguments_descriptor, |
| 69 arguments, | 68 arguments, |
| 70 context); | 69 context); |
| 71 #endif | 70 #endif |
| 72 } | 71 } |
| 73 | 72 |
| 74 | 73 |
| 75 RawObject* DartEntry::InvokeClosure(const Array& arguments) { | 74 RawObject* DartEntry::InvokeClosure(const Array& arguments) { |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 String::Handle(Field::GetterName(Symbols::_id())))); | 473 String::Handle(Field::GetterName(Symbols::_id())))); |
| 475 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); | 474 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); |
| 476 ASSERT(!func.IsNull()); | 475 ASSERT(!func.IsNull()); |
| 477 const Array& args = Array::Handle(Array::New(1)); | 476 const Array& args = Array::Handle(Array::New(1)); |
| 478 args.SetAt(0, port); | 477 args.SetAt(0, port); |
| 479 return DartEntry::InvokeFunction(func, args); | 478 return DartEntry::InvokeFunction(func, args); |
| 480 } | 479 } |
| 481 | 480 |
| 482 | 481 |
| 483 } // namespace dart | 482 } // namespace dart |
| OLD | NEW |