| 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 "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 4147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4158 const String& function_name, | 4158 const String& function_name, |
| 4159 ArgumentListNode* function_arguments, | 4159 ArgumentListNode* function_arguments, |
| 4160 int invocation_type) { | 4160 int invocation_type) { |
| 4161 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 4161 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 4162 new (Z) ZoneGrowableArray<PushArgumentInstr*>(); | 4162 new (Z) ZoneGrowableArray<PushArgumentInstr*>(); |
| 4163 // Object receiver, actually a class literal of the unresolved method's owner. | 4163 // Object receiver, actually a class literal of the unresolved method's owner. |
| 4164 AbstractType& type = Type::ZoneHandle( | 4164 AbstractType& type = Type::ZoneHandle( |
| 4165 Z, | 4165 Z, |
| 4166 Type::New(function_class, TypeArguments::Handle(Z, TypeArguments::null()), | 4166 Type::New(function_class, TypeArguments::Handle(Z, TypeArguments::null()), |
| 4167 token_pos, Heap::kOld)); | 4167 token_pos, Heap::kOld)); |
| 4168 type ^= ClassFinalizer::FinalizeType(function_class, type, | 4168 type ^= ClassFinalizer::FinalizeType(function_class, type); |
| 4169 ClassFinalizer::kCanonicalize); | |
| 4170 Value* receiver_value = Bind(new (Z) ConstantInstr(type)); | 4169 Value* receiver_value = Bind(new (Z) ConstantInstr(type)); |
| 4171 arguments->Add(PushArgument(receiver_value)); | 4170 arguments->Add(PushArgument(receiver_value)); |
| 4172 // String memberName. | 4171 // String memberName. |
| 4173 const String& member_name = | 4172 const String& member_name = |
| 4174 String::ZoneHandle(Z, Symbols::New(T, function_name)); | 4173 String::ZoneHandle(Z, Symbols::New(T, function_name)); |
| 4175 Value* member_name_value = Bind(new (Z) ConstantInstr(member_name)); | 4174 Value* member_name_value = Bind(new (Z) ConstantInstr(member_name)); |
| 4176 arguments->Add(PushArgument(member_name_value)); | 4175 arguments->Add(PushArgument(member_name_value)); |
| 4177 // Smi invocation_type. | 4176 // Smi invocation_type. |
| 4178 Value* invocation_type_value = Bind( | 4177 Value* invocation_type_value = Bind( |
| 4179 new (Z) ConstantInstr(Smi::ZoneHandle(Z, Smi::New(invocation_type)))); | 4178 new (Z) ConstantInstr(Smi::ZoneHandle(Z, Smi::New(invocation_type)))); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4358 graph_entry_->PruneUnreachable(graph_entry_, NULL, osr_id_, block_marks); | 4357 graph_entry_->PruneUnreachable(graph_entry_, NULL, osr_id_, block_marks); |
| 4359 ASSERT(found); | 4358 ASSERT(found); |
| 4360 } | 4359 } |
| 4361 | 4360 |
| 4362 | 4361 |
| 4363 void FlowGraphBuilder::Bailout(const char* reason) const { | 4362 void FlowGraphBuilder::Bailout(const char* reason) const { |
| 4364 parsed_function_.Bailout("FlowGraphBuilder", reason); | 4363 parsed_function_.Bailout("FlowGraphBuilder", reason); |
| 4365 } | 4364 } |
| 4366 | 4365 |
| 4367 } // namespace dart | 4366 } // namespace dart |
| OLD | NEW |