| 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 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 const GrowableObjectArray& closures = | 1815 const GrowableObjectArray& closures = |
| 1816 GrowableObjectArray::Handle(raw_ptr()->closure_functions_); | 1816 GrowableObjectArray::Handle(raw_ptr()->closure_functions_); |
| 1817 Function& closure = Function::Handle(); | 1817 Function& closure = Function::Handle(); |
| 1818 intptr_t num_closures = closures.Length(); | 1818 intptr_t num_closures = closures.Length(); |
| 1819 intptr_t best_fit_token_pos = -1; | 1819 intptr_t best_fit_token_pos = -1; |
| 1820 intptr_t best_fit_index = -1; | 1820 intptr_t best_fit_index = -1; |
| 1821 for (intptr_t i = 0; i < num_closures; i++) { | 1821 for (intptr_t i = 0; i < num_closures; i++) { |
| 1822 closure ^= closures.At(i); | 1822 closure ^= closures.At(i); |
| 1823 ASSERT(!closure.IsNull()); | 1823 ASSERT(!closure.IsNull()); |
| 1824 if ((closure.token_pos() <= token_pos) && | 1824 if ((closure.token_pos() <= token_pos) && |
| 1825 (token_pos < closure.end_token_pos()) && | 1825 (token_pos <= closure.end_token_pos()) && |
| 1826 (best_fit_token_pos < closure.token_pos())) { | 1826 (best_fit_token_pos < closure.token_pos())) { |
| 1827 best_fit_index = i; | 1827 best_fit_index = i; |
| 1828 best_fit_token_pos = closure.token_pos(); | 1828 best_fit_token_pos = closure.token_pos(); |
| 1829 } | 1829 } |
| 1830 } | 1830 } |
| 1831 closure = Function::null(); | 1831 closure = Function::null(); |
| 1832 if (best_fit_index >= 0) { | 1832 if (best_fit_index >= 0) { |
| 1833 closure ^= closures.At(best_fit_index); | 1833 closure ^= closures.At(best_fit_index); |
| 1834 } | 1834 } |
| 1835 return closure.raw(); | 1835 return closure.raw(); |
| (...skipping 14213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16049 return "_MirrorReference"; | 16049 return "_MirrorReference"; |
| 16050 } | 16050 } |
| 16051 | 16051 |
| 16052 | 16052 |
| 16053 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 16053 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 16054 Instance::PrintToJSONStream(stream, ref); | 16054 Instance::PrintToJSONStream(stream, ref); |
| 16055 } | 16055 } |
| 16056 | 16056 |
| 16057 | 16057 |
| 16058 } // namespace dart | 16058 } // namespace dart |
| OLD | NEW |