Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 2755723003: Make sure the signature of the call method is finalized before involving it (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698