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

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

Issue 240283005: Adds simulator debugger and Stop to arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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/simulator_arm64.cc ('k') | runtime/vm/stub_code_arm64.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) 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 "vm/stub_code.h" 5 #include "vm/stub_code.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/disassembler.h" 10 #include "vm/disassembler.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #undef STUB_CODE_DELETER 44 #undef STUB_CODE_DELETER
45 } 45 }
46 46
47 47
48 #define STUB_CODE_GENERATE(name) \ 48 #define STUB_CODE_GENERATE(name) \
49 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \ 49 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
50 name##_entry_ = new StubEntry("_stub_"#name, code); 50 name##_entry_ = new StubEntry("_stub_"#name, code);
51 51
52 52
53 void StubCode::InitOnce() { 53 void StubCode::InitOnce() {
54 // TODO(zra): ifndef to be removed when ARM64 port is ready.
55 #if !defined(TARGET_ARCH_ARM64)
56 // Generate all the stubs. 54 // Generate all the stubs.
57 Code& code = Code::Handle(); 55 Code& code = Code::Handle();
58 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); 56 VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
59 #endif
60 } 57 }
61 58
62 59
63 void StubCode::GenerateFor(Isolate* init) { 60 void StubCode::GenerateFor(Isolate* init) {
64 // Generate all the stubs. 61 // Generate all the stubs.
65 Code& code = Code::Handle(); 62 Code& code = Code::Handle();
66 STUB_CODE_LIST(STUB_CODE_GENERATE); 63 STUB_CODE_LIST(STUB_CODE_GENERATE);
67 } 64 }
68 65
69 #undef STUB_CODE_GENERATE 66 #undef STUB_CODE_GENERATE
70 67
71 68
72 void StubCode::Init(Isolate* isolate) { 69 void StubCode::Init(Isolate* isolate) {
73 // TODO(zra): ifndef to be removed when ARM64 port is ready.
74 #if !defined(TARGET_ARCH_ARM64)
75 StubCode* stubs = new StubCode(); 70 StubCode* stubs = new StubCode();
76 isolate->set_stub_code(stubs); 71 isolate->set_stub_code(stubs);
77 stubs->GenerateFor(isolate); 72 stubs->GenerateFor(isolate);
78 #endif
79 } 73 }
80 74
81 75
82 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) { 76 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) {
83 // The current isolate is needed as part of the macro. 77 // The current isolate is needed as part of the macro.
84 Isolate* isolate = Isolate::Current(); 78 Isolate* isolate = Isolate::Current();
85 StubCode* stubs = isolate->stub_code(); 79 StubCode* stubs = isolate->stub_code();
86 if (stubs == NULL) return; 80 if (stubs == NULL) return;
87 StubEntry* entry; 81 StubEntry* entry;
88 #define STUB_CODE_VISIT_OBJECT_POINTER(name) \ 82 #define STUB_CODE_VISIT_OBJECT_POINTER(name) \
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 VM_STUB_CODE_LIST(STUB_CODE_TESTER); 143 VM_STUB_CODE_LIST(STUB_CODE_TESTER);
150 Isolate* isolate = Isolate::Current(); 144 Isolate* isolate = Isolate::Current();
151 if ((isolate != NULL) && (isolate->stub_code() != NULL)) { 145 if ((isolate != NULL) && (isolate->stub_code() != NULL)) {
152 STUB_CODE_LIST(STUB_CODE_TESTER); 146 STUB_CODE_LIST(STUB_CODE_TESTER);
153 } 147 }
154 #undef STUB_CODE_TESTER 148 #undef STUB_CODE_TESTER
155 return NULL; 149 return NULL;
156 } 150 }
157 151
158 } // namespace dart 152 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm64.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698