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

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

Issue 1560663002: Drop precompiler-related code from dart_precompiled binary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: omit stub-code generation code Created 4 years, 11 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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | 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 27 matching lines...) Expand all
38 visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_)); 38 visitor->VisitPointer(reinterpret_cast<RawObject**>(&code_));
39 } 39 }
40 40
41 41
42 #define STUB_CODE_GENERATE(name) \ 42 #define STUB_CODE_GENERATE(name) \
43 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \ 43 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
44 name##_entry_ = new StubEntry(code); 44 name##_entry_ = new StubEntry(code);
45 45
46 46
47 void StubCode::InitOnce() { 47 void StubCode::InitOnce() {
48 #if !defined(DART_PRECOMPILED)
48 // Generate all the stubs. 49 // Generate all the stubs.
49 Code& code = Code::Handle(); 50 Code& code = Code::Handle();
50 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); 51 VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
52 #endif // DART_PRECOMPILED
rmacnak 2016/01/05 18:47:03 else UNREACHABLE
Florian Schneider 2016/01/06 10:38:53 Done.
51 } 53 }
52 54
53 55
54 #undef STUB_CODE_GENERATE 56 #undef STUB_CODE_GENERATE
55 57
56 58
57 void StubCode::ReadFrom(SnapshotReader* reader) { 59 void StubCode::ReadFrom(SnapshotReader* reader) {
58 #define READ_STUB(name) \ 60 #define READ_STUB(name) \
59 *(reader->CodeHandle()) ^= reader->ReadObject(); \ 61 *(reader->CodeHandle()) ^= reader->ReadObject(); \
60 name##_entry_ = new StubEntry(*(reader->CodeHandle())); 62 name##_entry_ = new StubEntry(*(reader->CodeHandle()));
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if ((name##_entry() != NULL) && \ 175 if ((name##_entry() != NULL) && \
174 (entry_point == name##_entry()->EntryPoint())) { \ 176 (entry_point == name##_entry()->EntryPoint())) { \
175 return ""#name; \ 177 return ""#name; \
176 } 178 }
177 VM_STUB_CODE_LIST(VM_STUB_CODE_TESTER); 179 VM_STUB_CODE_LIST(VM_STUB_CODE_TESTER);
178 #undef VM_STUB_CODE_TESTER 180 #undef VM_STUB_CODE_TESTER
179 return NULL; 181 return NULL;
180 } 182 }
181 183
182 } // namespace dart 184 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698