| 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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 const bool requires_type_arguments = cls.HasTypeArguments(); | 1619 const bool requires_type_arguments = cls.HasTypeArguments(); |
| 1620 Value* type_arguments = NULL; | 1620 Value* type_arguments = NULL; |
| 1621 if (requires_type_arguments) { | 1621 if (requires_type_arguments) { |
| 1622 ASSERT(!function.IsImplicitStaticClosureFunction()); | 1622 ASSERT(!function.IsImplicitStaticClosureFunction()); |
| 1623 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL); | 1623 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL); |
| 1624 } else { | 1624 } else { |
| 1625 type_arguments = BuildNullValue(); | 1625 type_arguments = BuildNullValue(); |
| 1626 } | 1626 } |
| 1627 PushArgumentInstr* push_type_arguments = PushArgument(type_arguments); | 1627 PushArgumentInstr* push_type_arguments = PushArgument(type_arguments); |
| 1628 arguments->Add(push_type_arguments); | 1628 arguments->Add(push_type_arguments); |
| 1629 ReturnDefinition(new CreateClosureInstr(node, arguments)); | 1629 ReturnDefinition( |
| 1630 new CreateClosureInstr(node->function(), arguments, node->token_pos())); |
| 1630 } | 1631 } |
| 1631 | 1632 |
| 1632 | 1633 |
| 1633 void EffectGraphVisitor::TranslateArgumentList( | 1634 void EffectGraphVisitor::TranslateArgumentList( |
| 1634 const ArgumentListNode& node, | 1635 const ArgumentListNode& node, |
| 1635 ZoneGrowableArray<Value*>* values) { | 1636 ZoneGrowableArray<Value*>* values) { |
| 1636 for (intptr_t i = 0; i < node.length(); ++i) { | 1637 for (intptr_t i = 0; i < node.length(); ++i) { |
| 1637 ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth()); | 1638 ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth()); |
| 1638 node.NodeAt(i)->Visit(&for_argument); | 1639 node.NodeAt(i)->Visit(&for_argument); |
| 1639 Append(for_argument); | 1640 Append(for_argument); |
| (...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; | 3095 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; |
| 3095 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 3096 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 3096 OS::SNPrint(chars, len, kFormat, function_name, reason); | 3097 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 3097 const Error& error = Error::Handle( | 3098 const Error& error = Error::Handle( |
| 3098 LanguageError::New(String::Handle(String::New(chars)))); | 3099 LanguageError::New(String::Handle(String::New(chars)))); |
| 3099 Isolate::Current()->long_jump_base()->Jump(1, error); | 3100 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3100 } | 3101 } |
| 3101 | 3102 |
| 3102 | 3103 |
| 3103 } // namespace dart | 3104 } // namespace dart |
| OLD | NEW |