| 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 4397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4408 } | 4408 } |
| 4409 } | 4409 } |
| 4410 return true; | 4410 return true; |
| 4411 } | 4411 } |
| 4412 | 4412 |
| 4413 | 4413 |
| 4414 // The compiler generates an implicit constructor if a class definition | 4414 // The compiler generates an implicit constructor if a class definition |
| 4415 // does not contain an explicit constructor or factory. The implicit | 4415 // does not contain an explicit constructor or factory. The implicit |
| 4416 // constructor has the same token position as the owner class. | 4416 // constructor has the same token position as the owner class. |
| 4417 bool Function::IsImplicitConstructor() const { | 4417 bool Function::IsImplicitConstructor() const { |
| 4418 return IsConstructor() && | 4418 return IsConstructor() && (token_pos() == end_token_pos()); |
| 4419 (token_pos() == Class::Handle(Owner()).token_pos()); | |
| 4420 } | 4419 } |
| 4421 | 4420 |
| 4422 | 4421 |
| 4423 bool Function::IsImplicitClosureFunction() const { | 4422 bool Function::IsImplicitClosureFunction() const { |
| 4424 if (!IsClosureFunction()) { | 4423 if (!IsClosureFunction()) { |
| 4425 return false; | 4424 return false; |
| 4426 } | 4425 } |
| 4427 const Function& parent = Function::Handle(parent_function()); | 4426 const Function& parent = Function::Handle(parent_function()); |
| 4428 return (parent.implicit_closure_function() == raw()); | 4427 return (parent.implicit_closure_function() == raw()); |
| 4429 } | 4428 } |
| (...skipping 9719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14149 } | 14148 } |
| 14150 | 14149 |
| 14151 | 14150 |
| 14152 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 14151 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 14153 stream->OpenObject(); | 14152 stream->OpenObject(); |
| 14154 stream->CloseObject(); | 14153 stream->CloseObject(); |
| 14155 } | 14154 } |
| 14156 | 14155 |
| 14157 | 14156 |
| 14158 } // namespace dart | 14157 } // namespace dart |
| OLD | NEW |