| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 } | 2198 } |
| 2199 return true; | 2199 return true; |
| 2200 } | 2200 } |
| 2201 | 2201 |
| 2202 | 2202 |
| 2203 RawFunction* Class::LookupFunction(const String& name) const { | 2203 RawFunction* Class::LookupFunction(const String& name) const { |
| 2204 Isolate* isolate = Isolate::Current(); | 2204 Isolate* isolate = Isolate::Current(); |
| 2205 ASSERT(name.IsOneByteString()); | 2205 ASSERT(name.IsOneByteString()); |
| 2206 const OneByteString& lookup_name = OneByteString::Cast(name); | 2206 const OneByteString& lookup_name = OneByteString::Cast(name); |
| 2207 Array& funcs = Array::Handle(isolate, functions()); | 2207 Array& funcs = Array::Handle(isolate, functions()); |
| 2208 if (funcs.IsNull()) { |
| 2209 // This can occur, e.g., for Null classes. |
| 2210 return Function::null(); |
| 2211 } |
| 2208 Function& function = Function::Handle(isolate, Function::null()); | 2212 Function& function = Function::Handle(isolate, Function::null()); |
| 2209 OneByteString& function_name = | 2213 OneByteString& function_name = |
| 2210 OneByteString::Handle(isolate, OneByteString::null()); | 2214 OneByteString::Handle(isolate, OneByteString::null()); |
| 2211 intptr_t len = funcs.Length(); | 2215 intptr_t len = funcs.Length(); |
| 2212 for (intptr_t i = 0; i < len; i++) { | 2216 for (intptr_t i = 0; i < len; i++) { |
| 2213 function ^= funcs.At(i); | 2217 function ^= funcs.At(i); |
| 2214 function_name ^= function.name(); | 2218 function_name ^= function.name(); |
| 2215 if (function_name.EqualsIgnoringPrivateKey(lookup_name)) { | 2219 if (function_name.EqualsIgnoringPrivateKey(lookup_name)) { |
| 2216 return function.raw(); | 2220 return function.raw(); |
| 2217 } | 2221 } |
| (...skipping 9983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12201 } | 12205 } |
| 12202 return result.raw(); | 12206 return result.raw(); |
| 12203 } | 12207 } |
| 12204 | 12208 |
| 12205 | 12209 |
| 12206 const char* WeakProperty::ToCString() const { | 12210 const char* WeakProperty::ToCString() const { |
| 12207 return "_WeakProperty"; | 12211 return "_WeakProperty"; |
| 12208 } | 12212 } |
| 12209 | 12213 |
| 12210 } // namespace dart | 12214 } // namespace dart |
| OLD | NEW |