Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: runtime/vm/dart_entry.cc

Issue 221133002: Begins work on ARM64, first assembler test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: adds files Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dart_entry_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // TODO(zra): Change to intptr_t so we have only one case.
63 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
64 reinterpret_cast<int64_t>(entrypoint),
65 static_cast<int64_t>(code.EntryPoint()),
66 reinterpret_cast<int64_t>(&arguments_descriptor),
67 reinterpret_cast<int64_t>(&arguments),
68 reinterpret_cast<int64_t>(&context)));
69 #else
61 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( 70 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
62 reinterpret_cast<int32_t>(entrypoint), 71 reinterpret_cast<int32_t>(entrypoint),
63 static_cast<int32_t>(code.EntryPoint()), 72 static_cast<int32_t>(code.EntryPoint()),
64 reinterpret_cast<int32_t>(&arguments_descriptor), 73 reinterpret_cast<int32_t>(&arguments_descriptor),
65 reinterpret_cast<int32_t>(&arguments), 74 reinterpret_cast<int32_t>(&arguments),
66 reinterpret_cast<int32_t>(&context))); 75 reinterpret_cast<int32_t>(&context)));
76 #endif
67 #else 77 #else
68 return entrypoint(code.EntryPoint(), 78 return entrypoint(code.EntryPoint(),
69 arguments_descriptor, 79 arguments_descriptor,
70 arguments, 80 arguments,
71 context); 81 context);
72 #endif 82 #endif
73 } 83 }
74 84
75 85
76 RawObject* DartEntry::InvokeClosure(const Array& arguments) { 86 RawObject* DartEntry::InvokeClosure(const Array& arguments) {
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // Get send port class from isolate library. 522 // Get send port class from isolate library.
513 const Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); 523 const Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
514 const Class& recv_port_cls = Class::Handle( 524 const Class& recv_port_cls = Class::Handle(
515 isolate_lib.LookupClassAllowPrivate(Symbols::_RawReceivePortImpl())); 525 isolate_lib.LookupClassAllowPrivate(Symbols::_RawReceivePortImpl()));
516 // Check for the same class id. 526 // Check for the same class id.
517 ASSERT(!recv_port_cls.IsNull()); 527 ASSERT(!recv_port_cls.IsNull());
518 return cls.id() == recv_port_cls.id(); 528 return cls.id() == recv_port_cls.id();
519 } 529 }
520 530
521 } // namespace dart 531 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dart_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698