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

Side by Side Diff: runtime/vm/runtime_entry.h

Issue 1462953002: VM: Make more globals constant where easily possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unnecessary const_cast Created 5 years, 1 month 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/object.cc ('k') | runtime/vm/service.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_RUNTIME_ENTRY_H_ 5 #ifndef VM_RUNTIME_ENTRY_H_
6 #define VM_RUNTIME_ENTRY_H_ 6 #define VM_RUNTIME_ENTRY_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/native_arguments.h" 10 #include "vm/native_arguments.h"
(...skipping 27 matching lines...) Expand all
38 class RuntimeEntry : public ValueObject { 38 class RuntimeEntry : public ValueObject {
39 public: 39 public:
40 RuntimeEntry(const char* name, RuntimeFunction function, 40 RuntimeEntry(const char* name, RuntimeFunction function,
41 intptr_t argument_count, bool is_leaf, bool is_float) 41 intptr_t argument_count, bool is_leaf, bool is_float)
42 : name_(name), 42 : name_(name),
43 function_(function), 43 function_(function),
44 argument_count_(argument_count), 44 argument_count_(argument_count),
45 is_leaf_(is_leaf), 45 is_leaf_(is_leaf),
46 is_float_(is_float), 46 is_float_(is_float),
47 next_(NULL) { 47 next_(NULL) {
48 // Strip off const for registration. 48 VMTag::RegisterRuntimeEntry(this);
49 VMTag::RegisterRuntimeEntry(const_cast<RuntimeEntry*>(this));
50 } 49 }
51 ~RuntimeEntry() {} 50 ~RuntimeEntry() {}
52 51
53 const char* name() const { return name_; } 52 const char* name() const { return name_; }
54 RuntimeFunction function() const { return function_; } 53 RuntimeFunction function() const { return function_; }
55 intptr_t argument_count() const { return argument_count_; } 54 intptr_t argument_count() const { return argument_count_; }
56 bool is_leaf() const { return is_leaf_; } 55 bool is_leaf() const { return is_leaf_; }
57 bool is_float() const { return is_float_; } 56 bool is_float() const { return is_float_; }
58 uword GetEntryPoint() const; 57 uword GetEntryPoint() const;
59 58
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \ 170 #define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...) \
172 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id; 171 if (address == k##name##RuntimeEntry.GetEntryPoint()) return k##name##Id;
173 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS) 172 LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS)
174 #undef CHECK_LEAF_RUNTIME_ADDRESS 173 #undef CHECK_LEAF_RUNTIME_ADDRESS
175 return kNoRuntimeFunctionId; 174 return kNoRuntimeFunctionId;
176 } 175 }
177 176
178 } // namespace dart 177 } // namespace dart
179 178
180 #endif // VM_RUNTIME_ENTRY_H_ 179 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698