| 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 void FlowGraphCompiler::GenerateInstanceCall( | 491 void FlowGraphCompiler::GenerateInstanceCall( |
| 492 intptr_t deopt_id, | 492 intptr_t deopt_id, |
| 493 intptr_t token_pos, | 493 intptr_t token_pos, |
| 494 intptr_t argument_count, | 494 intptr_t argument_count, |
| 495 const Array& argument_names, | 495 const Array& argument_names, |
| 496 LocationSummary* locs, | 496 LocationSummary* locs, |
| 497 const ICData& ic_data) { | 497 const ICData& ic_data) { |
| 498 ASSERT(!ic_data.IsNull()); | 498 ASSERT(!ic_data.IsNull()); |
| 499 ASSERT(FLAG_propagate_ic_data || (ic_data.NumberOfChecks() == 0)); | 499 ASSERT(FLAG_propagate_ic_data || (ic_data.NumberOfChecks() == 0)); |
| 500 const Array& arguments_descriptor = | 500 const Array& arguments_descriptor = |
| 501 DartEntry::ArgumentsDescriptor(argument_count, argument_names); | 501 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 502 argument_names)); |
| 502 uword label_address = 0; | 503 uword label_address = 0; |
| 503 if (is_optimizing() && (ic_data.NumberOfChecks() == 0)) { | 504 if (is_optimizing() && (ic_data.NumberOfChecks() == 0)) { |
| 504 if (ic_data.is_closure_call()) { | 505 if (ic_data.is_closure_call()) { |
| 505 // This IC call may be closure call only. | 506 // This IC call may be closure call only. |
| 506 label_address = StubCode::ClosureCallInlineCacheEntryPoint(); | 507 label_address = StubCode::ClosureCallInlineCacheEntryPoint(); |
| 507 ExternalLabel target_label("InlineCache", label_address); | 508 ExternalLabel target_label("InlineCache", label_address); |
| 508 EmitInstanceCall(&target_label, | 509 EmitInstanceCall(&target_label, |
| 509 ICData::ZoneHandle(ic_data.AsUnaryClassChecks()), | 510 ICData::ZoneHandle(ic_data.AsUnaryClassChecks()), |
| 510 arguments_descriptor, argument_count, | 511 arguments_descriptor, argument_count, |
| 511 deopt_id, token_pos, locs); | 512 deopt_id, token_pos, locs); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 559 } |
| 559 | 560 |
| 560 | 561 |
| 561 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, | 562 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, |
| 562 intptr_t token_pos, | 563 intptr_t token_pos, |
| 563 const Function& function, | 564 const Function& function, |
| 564 intptr_t argument_count, | 565 intptr_t argument_count, |
| 565 const Array& argument_names, | 566 const Array& argument_names, |
| 566 LocationSummary* locs) { | 567 LocationSummary* locs) { |
| 567 const Array& arguments_descriptor = | 568 const Array& arguments_descriptor = |
| 568 DartEntry::ArgumentsDescriptor(argument_count, argument_names); | 569 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 570 argument_names)); |
| 569 EmitStaticCall(function, arguments_descriptor, argument_count, | 571 EmitStaticCall(function, arguments_descriptor, argument_count, |
| 570 deopt_id, token_pos, locs); | 572 deopt_id, token_pos, locs); |
| 571 } | 573 } |
| 572 | 574 |
| 573 | 575 |
| 574 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg, | 576 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg, |
| 575 const AbstractType& type, | 577 const AbstractType& type, |
| 576 Label* is_instance_lbl, | 578 Label* is_instance_lbl, |
| 577 Label* is_not_instance_lbl) { | 579 Label* is_not_instance_lbl) { |
| 578 assembler()->Comment("NumberTypeCheck"); | 580 assembler()->Comment("NumberTypeCheck"); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 const AbstractTypeArguments& type_arguments = | 1029 const AbstractTypeArguments& type_arguments = |
| 1028 AbstractTypeArguments::Handle(type.arguments()); | 1030 AbstractTypeArguments::Handle(type.arguments()); |
| 1029 const bool is_raw_type = type_arguments.IsNull() || | 1031 const bool is_raw_type = type_arguments.IsNull() || |
| 1030 type_arguments.IsRaw(type_arguments.Length()); | 1032 type_arguments.IsRaw(type_arguments.Length()); |
| 1031 return is_raw_type; | 1033 return is_raw_type; |
| 1032 } | 1034 } |
| 1033 return true; | 1035 return true; |
| 1034 } | 1036 } |
| 1035 | 1037 |
| 1036 } // namespace dart | 1038 } // namespace dart |
| OLD | NEW |