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

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

Issue 12260026: Add support for object pool (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/raw_object.cc ('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) 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 "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/disassembler.h" 9 #include "vm/disassembler.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #undef STUB_CODE_DELETER 43 #undef STUB_CODE_DELETER
44 } 44 }
45 45
46 46
47 #define STUB_CODE_GENERATE(name) \ 47 #define STUB_CODE_GENERATE(name) \
48 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \ 48 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
49 name##_entry_ = new StubEntry("_stub_"#name, code); 49 name##_entry_ = new StubEntry("_stub_"#name, code);
50 50
51 51
52 void StubCode::InitOnce() { 52 void StubCode::InitOnce() {
53 // TODO(regis): Re-enable this after we are able to generate arm code. 53 // TODO(regis): Re-enable this after we are able to generate mips code.
54 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 54 #if defined(TARGET_ARCH_IA32) || \
55 defined(TARGET_ARCH_X64) || \
56 defined(TARGET_ARCH_ARM)
55 // Generate all the stubs. 57 // Generate all the stubs.
56 Code& code = Code::Handle(); 58 Code& code = Code::Handle();
57 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); 59 VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
58 #endif 60 #endif
59 } 61 }
60 62
61 63
62 void StubCode::GenerateFor(Isolate* init) { 64 void StubCode::GenerateFor(Isolate* init) {
63 // TODO(regis): Re-enable this after we are able to generate arm code. 65 // TODO(regis): Re-enable this after we are able to generate mips code.
64 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 66 #if defined(TARGET_ARCH_IA32) || \
67 defined(TARGET_ARCH_X64) || \
68 defined(TARGET_ARCH_ARM)
65 // Generate all the stubs. 69 // Generate all the stubs.
66 Code& code = Code::Handle(); 70 Code& code = Code::Handle();
67 STUB_CODE_LIST(STUB_CODE_GENERATE); 71 STUB_CODE_LIST(STUB_CODE_GENERATE);
68 #endif 72 #endif
69 } 73 }
70 74
71 #undef STUB_CODE_GENERATE 75 #undef STUB_CODE_GENERATE
72 76
73 77
74 void StubCode::Init(Isolate* isolate) { 78 void StubCode::Init(Isolate* isolate) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 VM_STUB_CODE_LIST(STUB_CODE_TESTER); 167 VM_STUB_CODE_LIST(STUB_CODE_TESTER);
164 Isolate* isolate = Isolate::Current(); 168 Isolate* isolate = Isolate::Current();
165 if ((isolate != NULL) && (isolate->stub_code() != NULL)) { 169 if ((isolate != NULL) && (isolate->stub_code() != NULL)) {
166 STUB_CODE_LIST(STUB_CODE_TESTER); 170 STUB_CODE_LIST(STUB_CODE_TESTER);
167 } 171 }
168 #undef STUB_CODE_TESTER 172 #undef STUB_CODE_TESTER
169 return NULL; 173 return NULL;
170 } 174 }
171 175
172 } // namespace dart 176 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698