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

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

Issue 810593008: Mark mutator methods of canonical constants as invisible to reflective access. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | tests/lib/mirrors/invocation_fuzz_test.dart » ('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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 RawClass* Object::unhandled_exception_class_ = 155 RawClass* Object::unhandled_exception_class_ =
156 reinterpret_cast<RawClass*>(RAW_NULL); 156 reinterpret_cast<RawClass*>(RAW_NULL);
157 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); 157 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
158 158
159 159
160 const double MegamorphicCache::kLoadFactor = 0.75; 160 const double MegamorphicCache::kLoadFactor = 0.75;
161 161
162 162
163 // The following functions are marked as invisible, meaning they will be hidden 163 // The following functions are marked as invisible, meaning they will be hidden
164 // in the stack trace and will be hidden from reflective access. 164 // in the stack trace and will be hidden from reflective access.
165 // All mutators of canonical constants should be hidden from reflective access.
165 // Additionally, private functions in dart:* that are native or constructors are 166 // Additionally, private functions in dart:* that are native or constructors are
166 // marked as invisible by the parser. 167 // marked as invisible by the parser.
167 #define INVISIBLE_CLASS_FUNCTIONS(V) \ 168 #define INVISIBLE_CLASS_FUNCTIONS(V) \
168 V(AsyncLibrary, _AsyncRun, _scheduleImmediate) \ 169 V(AsyncLibrary, _AsyncRun, _scheduleImmediate) \
169 V(CoreLibrary, StringBuffer, _addPart) \ 170 V(CoreLibrary, StringBuffer, _addPart) \
171 V(CoreLibrary, _Bigint, _setInt) \
172 V(CoreLibrary, _Bigint, _setHex) \
173 V(CoreLibrary, _Bigint, _setDouble) \
174 V(CoreLibrary, _Bigint, _ensureLength) \
175 V(CoreLibrary, _Bigint, _clamp) \
170 V(CoreLibrary, _Bigint, _absAdd) \ 176 V(CoreLibrary, _Bigint, _absAdd) \
171 V(CoreLibrary, _Bigint, _absSub) \ 177 V(CoreLibrary, _Bigint, _absSub) \
172 V(CoreLibrary, _Bigint, _estQuotientDigit) \ 178 V(CoreLibrary, _Bigint, _estQuotientDigit) \
173 V(CoreLibrary, _Bigint, _mulAdd) \ 179 V(CoreLibrary, _Bigint, _mulAdd) \
174 V(CoreLibrary, _Bigint, _sqrAdd) \ 180 V(CoreLibrary, _Bigint, _sqrAdd) \
175 V(CoreLibrary, _Double, _addFromInteger) \ 181 V(CoreLibrary, _Double, _addFromInteger) \
176 V(CoreLibrary, _Double, _moduloFromInteger) \ 182 V(CoreLibrary, _Double, _moduloFromInteger) \
177 V(CoreLibrary, _Double, _mulFromInteger) \ 183 V(CoreLibrary, _Double, _mulFromInteger) \
178 V(CoreLibrary, _Double, _remainderFromInteger) \ 184 V(CoreLibrary, _Double, _remainderFromInteger) \
179 V(CoreLibrary, _Double, _subFromInteger) \ 185 V(CoreLibrary, _Double, _subFromInteger) \
(...skipping 20452 matching lines...) Expand 10 before | Expand all | Expand 10 after
20632 return tag_label.ToCString(); 20638 return tag_label.ToCString();
20633 } 20639 }
20634 20640
20635 20641
20636 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20642 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20637 Instance::PrintJSONImpl(stream, ref); 20643 Instance::PrintJSONImpl(stream, ref);
20638 } 20644 }
20639 20645
20640 20646
20641 } // namespace dart 20647 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | tests/lib/mirrors/invocation_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698