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

Side by Side Diff: src/vm/intrinsics.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « src/vm/intrinsics.h ('k') | src/vm/links.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #include "src/vm/intrinsics.h" 5 #include "src/vm/intrinsics.h"
6 6
7 #include "src/shared/assert.h" 7 #include "src/shared/assert.h"
8 8
9 namespace fletch { 9 namespace dartino {
10 10
11 IntrinsicsTable* IntrinsicsTable::default_table_ = NULL; 11 IntrinsicsTable* IntrinsicsTable::default_table_ = NULL;
12 12
13 IntrinsicsTable* IntrinsicsTable::GetDefault() { 13 IntrinsicsTable* IntrinsicsTable::GetDefault() {
14 if (default_table_ == NULL) { 14 if (default_table_ == NULL) {
15 default_table_ = new IntrinsicsTable( 15 default_table_ = new IntrinsicsTable(
16 #define ADDRESS_GETTER(name) &Intrinsic_##name, 16 #define ADDRESS_GETTER(name) &Intrinsic_##name,
17 INTRINSICS_DO(ADDRESS_GETTER) 17 INTRINSICS_DO(ADDRESS_GETTER)
18 #undef ADDRESS_GETTER 18 #undef ADDRESS_GETTER
19 NULL); 19 NULL);
20 } 20 }
21 return default_table_; 21 return default_table_;
22 } 22 }
23 23
24 bool IntrinsicsTable::set_from_string(const char* name, void (*ptr)(void)) { 24 bool IntrinsicsTable::set_from_string(const char* name, void (*ptr)(void)) {
25 #define SET_INTRINSIC(name_) \ 25 #define SET_INTRINSIC(name_) \
26 if (strcmp(#name_, name) == 0) { \ 26 if (strcmp(#name_, name) == 0) { \
27 intrinsic_##name_##_ = ptr; \ 27 intrinsic_##name_##_ = ptr; \
28 return true; \ 28 return true; \
29 } 29 }
30 INTRINSICS_DO(SET_INTRINSIC) 30 INTRINSICS_DO(SET_INTRINSIC)
31 #undef SET_INTRINSIC 31 #undef SET_INTRINSIC
32 return false; 32 return false;
33 } 33 }
34 34
35 } // namespace fletch 35 } // namespace dartino
OLDNEW
« no previous file with comments | « src/vm/intrinsics.h ('k') | src/vm/links.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698