Chromium Code Reviews| 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/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 return error.raw(); | 51 return error.raw(); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 // Now Call the invoke stub which will invoke the dart function. | 54 // Now Call the invoke stub which will invoke the dart function. |
| 55 invokestub entrypoint = reinterpret_cast<invokestub>( | 55 invokestub entrypoint = reinterpret_cast<invokestub>( |
| 56 StubCode::InvokeDartCodeEntryPoint()); | 56 StubCode::InvokeDartCodeEntryPoint()); |
| 57 const Code& code = Code::Handle(function.CurrentCode()); | 57 const Code& code = Code::Handle(function.CurrentCode()); |
| 58 ASSERT(!code.IsNull()); | 58 ASSERT(!code.IsNull()); |
| 59 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); | 59 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); |
| 60 #if defined(USING_SIMULATOR) | 60 #if defined(USING_SIMULATOR) |
| 61 #if defined(ARCH_IS_64_BIT) | |
| 62 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( | |
| 63 reinterpret_cast<int64_t>(entrypoint), | |
| 64 static_cast<int64_t>(code.EntryPoint()), | |
| 65 reinterpret_cast<int64_t>(&arguments_descriptor), | |
| 66 reinterpret_cast<int64_t>(&arguments), | |
| 67 reinterpret_cast<int64_t>(&context))); | |
| 68 #else | |
|
regis
2014/04/01 19:52:53
I'm tempted to say let's change these types to int
zra
2014/04/01 20:35:08
I'll add a TODO.
| |
| 61 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( | 69 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( |
| 62 reinterpret_cast<int32_t>(entrypoint), | 70 reinterpret_cast<int32_t>(entrypoint), |
| 63 static_cast<int32_t>(code.EntryPoint()), | 71 static_cast<int32_t>(code.EntryPoint()), |
| 64 reinterpret_cast<int32_t>(&arguments_descriptor), | 72 reinterpret_cast<int32_t>(&arguments_descriptor), |
| 65 reinterpret_cast<int32_t>(&arguments), | 73 reinterpret_cast<int32_t>(&arguments), |
| 66 reinterpret_cast<int32_t>(&context))); | 74 reinterpret_cast<int32_t>(&context))); |
| 75 #endif | |
| 67 #else | 76 #else |
| 68 return entrypoint(code.EntryPoint(), | 77 return entrypoint(code.EntryPoint(), |
| 69 arguments_descriptor, | 78 arguments_descriptor, |
| 70 arguments, | 79 arguments, |
| 71 context); | 80 context); |
| 72 #endif | 81 #endif |
| 73 } | 82 } |
| 74 | 83 |
| 75 | 84 |
| 76 RawObject* DartEntry::InvokeClosure(const Array& arguments) { | 85 RawObject* DartEntry::InvokeClosure(const Array& arguments) { |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 512 // Get send port class from isolate library. | 521 // Get send port class from isolate library. |
| 513 const Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); | 522 const Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); |
| 514 const Class& recv_port_cls = Class::Handle( | 523 const Class& recv_port_cls = Class::Handle( |
| 515 isolate_lib.LookupClassAllowPrivate(Symbols::_RawReceivePortImpl())); | 524 isolate_lib.LookupClassAllowPrivate(Symbols::_RawReceivePortImpl())); |
| 516 // Check for the same class id. | 525 // Check for the same class id. |
| 517 ASSERT(!recv_port_cls.IsNull()); | 526 ASSERT(!recv_port_cls.IsNull()); |
| 518 return cls.id() == recv_port_cls.id(); | 527 return cls.id() == recv_port_cls.id(); |
| 519 } | 528 } |
| 520 | 529 |
| 521 } // namespace dart | 530 } // namespace dart |
| OLD | NEW |