| OLD | NEW |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 RawClass* Object::unhandled_exception_class_ = | 139 RawClass* Object::unhandled_exception_class_ = |
| 140 reinterpret_cast<RawClass*>(RAW_NULL); | 140 reinterpret_cast<RawClass*>(RAW_NULL); |
| 141 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); | 141 RawClass* Object::unwind_error_class_ = reinterpret_cast<RawClass*>(RAW_NULL); |
| 142 #undef RAW_NULL | 142 #undef RAW_NULL |
| 143 | 143 |
| 144 | 144 |
| 145 const double MegamorphicCache::kLoadFactor = 0.75; | 145 const double MegamorphicCache::kLoadFactor = 0.75; |
| 146 | 146 |
| 147 | 147 |
| 148 // The following functions are marked as invisible, meaning they will be hidden | 148 // The following functions are marked as invisible, meaning they will be hidden |
| 149 // in the stack trace. | 149 // in the stack trace and will be hidden from reflective access. |
| 150 // (Library, class name, method name) | 150 // (Library, class name, method name) |
| 151 #define INVISIBLE_LIST(V) \ | 151 #define INVISIBLE_LIST(V) \ |
| 152 V(CoreLibrary, Object, _noSuchMethod) \ | 152 V(CoreLibrary, Object, _noSuchMethod) \ |
| 153 V(CoreLibrary, Object, _as) \ | 153 V(CoreLibrary, Object, _as) \ |
| 154 V(CoreLibrary, Object, _instanceOf) \ | 154 V(CoreLibrary, Object, _instanceOf) \ |
| 155 V(CoreLibrary, _ObjectArray, _ObjectArray.) \ | 155 V(CoreLibrary, _ObjectArray, _ObjectArray.) \ |
| 156 V(CoreLibrary, AssertionError, _throwNew) \ | 156 V(CoreLibrary, AssertionError, _throwNew) \ |
| 157 V(CoreLibrary, TypeError, _throwNew) \ | 157 V(CoreLibrary, TypeError, _throwNew) \ |
| 158 V(CoreLibrary, FallThroughError, _throwNew) \ | 158 V(CoreLibrary, FallThroughError, _throwNew) \ |
| 159 V(CoreLibrary, AbstractClassInstantiationError, _throwNew) \ | 159 V(CoreLibrary, AbstractClassInstantiationError, _throwNew) \ |
| 160 V(CoreLibrary, NoSuchMethodError, _throwNew) \ | 160 V(CoreLibrary, NoSuchMethodError, _throwNew) \ |
| 161 V(CoreLibrary, int, _throwFormatException) \ | 161 V(CoreLibrary, int, _throwFormatException) \ |
| 162 V(CoreLibrary, int, _parse) \ | 162 V(CoreLibrary, int, _parse) \ |
| 163 V(CoreLibrary, StackTrace, _setupFullStackTrace) \ | 163 V(CoreLibrary, StackTrace, _setupFullStackTrace) \ |
| 164 V(CoreLibrary, _OneByteString, _setAt) \ |
| 164 | 165 |
| 165 | 166 |
| 166 static void MarkFunctionAsInvisible(const Library& lib, | 167 static void MarkFunctionAsInvisible(const Library& lib, |
| 167 const char* class_name, | 168 const char* class_name, |
| 168 const char* function_name) { | 169 const char* function_name) { |
| 169 ASSERT(!lib.IsNull()); | 170 ASSERT(!lib.IsNull()); |
| 170 const Class& cls = Class::Handle( | 171 const Class& cls = Class::Handle( |
| 171 lib.LookupClassAllowPrivate(String::Handle(String::New(class_name)), | 172 lib.LookupClassAllowPrivate(String::Handle(String::New(class_name)), |
| 172 NULL)); // No ambiguity error expected. | 173 NULL)); // No ambiguity error expected. |
| 173 ASSERT(!cls.IsNull()); | 174 ASSERT(!cls.IsNull()); |
| (...skipping 14673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14847 } | 14848 } |
| 14848 | 14849 |
| 14849 | 14850 |
| 14850 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 14851 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 14851 stream->OpenObject(); | 14852 stream->OpenObject(); |
| 14852 stream->CloseObject(); | 14853 stream->CloseObject(); |
| 14853 } | 14854 } |
| 14854 | 14855 |
| 14855 | 14856 |
| 14856 } // namespace dart | 14857 } // namespace dart |
| OLD | NEW |