| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "vm/ast_printer.h" | 7 #include "vm/ast_printer.h" |
| 8 #include "vm/code_descriptors.h" | 8 #include "vm/code_descriptors.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 } | 1651 } |
| 1652 | 1652 |
| 1653 | 1653 |
| 1654 static intptr_t GetResultCidOfConstructor(ConstructorCallNode* node) { | 1654 static intptr_t GetResultCidOfConstructor(ConstructorCallNode* node) { |
| 1655 if (node->constructor().IsFactory()) { | 1655 if (node->constructor().IsFactory()) { |
| 1656 const Function& function = node->constructor(); | 1656 const Function& function = node->constructor(); |
| 1657 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary()); | 1657 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary()); |
| 1658 const Class& function_class = Class::Handle(function.Owner()); | 1658 const Class& function_class = Class::Handle(function.Owner()); |
| 1659 | 1659 |
| 1660 if (function_class.library() == core_impl_lib.raw()) { | 1660 if (function_class.library() == core_impl_lib.raw()) { |
| 1661 if (function_class.Name() == Symbols::ListImplementation()) { | 1661 if (function_class.Name() == Symbols::List()) { |
| 1662 if (function.name() == Symbols::ListFactory()) { | 1662 if (function.name() == Symbols::ListFactory()) { |
| 1663 if (node->arguments()->length() == 0) { | 1663 if (node->arguments()->length() == 0) { |
| 1664 return kGrowableObjectArrayCid; | 1664 return kGrowableObjectArrayCid; |
| 1665 } else { | 1665 } else { |
| 1666 ASSERT(node->arguments()->length() == 1); | 1666 ASSERT(node->arguments()->length() == 1); |
| 1667 return kArrayCid; | 1667 return kArrayCid; |
| 1668 } | 1668 } |
| 1669 } | 1669 } |
| 1670 } | 1670 } |
| 1671 } | 1671 } |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 2643 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 2644 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 2644 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 2645 OS::SNPrint(chars, len, kFormat, function_name, reason); | 2645 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 2646 const Error& error = Error::Handle( | 2646 const Error& error = Error::Handle( |
| 2647 LanguageError::New(String::Handle(String::New(chars)))); | 2647 LanguageError::New(String::Handle(String::New(chars)))); |
| 2648 Isolate::Current()->long_jump_base()->Jump(1, error); | 2648 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2649 } | 2649 } |
| 2650 | 2650 |
| 2651 | 2651 |
| 2652 } // namespace dart | 2652 } // namespace dart |
| OLD | NEW |