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

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

Issue 12224024: Generate first ARM assembler test and execute (simulate) it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/simulator_mips.h ('k') | runtime/vm/unit_test.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 // Only build the simulator if not compiling for real MIPS hardware. 8 // Only build the simulator if not compiling for real MIPS hardware.
9 #if !defined(HOST_ARCH_MIPS) 9 #if !defined(HOST_ARCH_MIPS)
10 10
11 #include "vm/simulator.h" 11 #include "vm/simulator.h"
12 12
13 #include "vm/assembler.h" 13 #include "vm/assembler.h"
14 #include "vm/constants_mips.h" 14 #include "vm/constants_mips.h"
15 #include "vm/disassembler.h" 15 #include "vm/disassembler.h"
16 16
17 namespace dart { 17 namespace dart {
18 18
19 Simulator::Simulator() { 19 Simulator::Simulator() {
20 UNIMPLEMENTED(); 20 UNIMPLEMENTED();
21 } 21 }
22 22
23 23
24 Simulator::~Simulator() { 24 Simulator::~Simulator() {
25 UNIMPLEMENTED(); 25 Isolate* isolate = Isolate::Current();
26 if (isolate != NULL) {
27 isolate->set_simulator(NULL);
28 }
29 }
30
31
32 // Get the active Simulator for the current isolate.
33 Simulator* Simulator::Current() {
34 Simulator* simulator = Isolate::Current()->simulator();
35 if (simulator == NULL) {
36 simulator = new Simulator();
37 Isolate::Current()->set_simulator(simulator);
38 }
39 return simulator;
26 } 40 }
27 41
28 42
29 void Simulator::InitOnce() { 43 void Simulator::InitOnce() {
30 } 44 }
31 45
46
47 int64_t Simulator::Call(int32_t entry,
48 int32_t parameter0,
49 int32_t parameter1,
50 int32_t parameter2,
51 int32_t parameter3,
52 int32_t parameter4) {
53 UNIMPLEMENTED();
54 return 0LL;
55 }
56
32 } // namespace dart 57 } // namespace dart
33 58
34 #endif // !defined(HOST_ARCH_MIPS) 59 #endif // !defined(HOST_ARCH_MIPS)
35 60
36 #endif // defined TARGET_ARCH_MIPS 61 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698