| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
| 9 #include "vm/flow_graph_compiler.h" | 9 #include "vm/flow_graph_compiler.h" |
| 10 #include "vm/locations.h" | 10 #include "vm/locations.h" |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 compiler->GenerateInstanceCall(cid(), | 986 compiler->GenerateInstanceCall(cid(), |
| 987 token_index(), | 987 token_index(), |
| 988 try_index(), | 988 try_index(), |
| 989 function_name(), | 989 function_name(), |
| 990 ArgumentCount(), | 990 ArgumentCount(), |
| 991 argument_names(), | 991 argument_names(), |
| 992 checked_argument_count()); | 992 checked_argument_count()); |
| 993 } | 993 } |
| 994 | 994 |
| 995 | 995 |
| 996 LocationSummary* PolymorphicInstanceCallComp::MakeLocationSummary() const { | 996 bool InstanceCallComp::VerifyComputation() { |
| 997 return MakeCallSummary(); | 997 return VerifyCallComputation(this); |
| 998 } | |
| 999 | |
| 1000 | |
| 1001 void PolymorphicInstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 1002 // TODO(srdjan): Add checked calls, a series of checks each issuing | |
| 1003 // a direct call to the target if check succeeds. | |
| 1004 ASSERT(VerifyCallComputation(instance_call())); | |
| 1005 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 1006 instance_call()->cid(), | |
| 1007 instance_call()->token_index(), | |
| 1008 instance_call()->try_index()); | |
| 1009 compiler->GenerateInstanceCall(instance_call()->cid(), | |
| 1010 instance_call()->token_index(), | |
| 1011 instance_call()->try_index(), | |
| 1012 instance_call()->function_name(), | |
| 1013 instance_call()->ArgumentCount(), | |
| 1014 instance_call()->argument_names(), | |
| 1015 instance_call()->checked_argument_count()); | |
| 1016 } | 998 } |
| 1017 | 999 |
| 1018 | 1000 |
| 1019 LocationSummary* StaticCallComp::MakeLocationSummary() const { | 1001 LocationSummary* StaticCallComp::MakeLocationSummary() const { |
| 1020 return MakeCallSummary(); | 1002 return MakeCallSummary(); |
| 1021 } | 1003 } |
| 1022 | 1004 |
| 1023 | 1005 |
| 1024 void StaticCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1006 void StaticCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1025 ASSERT(VerifyCallComputation(this)); | 1007 ASSERT(VerifyCallComputation(this)); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 void CreateClosureComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1133 void CreateClosureComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1152 const Function& closure_function = function(); | 1134 const Function& closure_function = function(); |
| 1153 const Code& stub = Code::Handle( | 1135 const Code& stub = Code::Handle( |
| 1154 StubCode::GetAllocationStubForClosure(closure_function)); | 1136 StubCode::GetAllocationStubForClosure(closure_function)); |
| 1155 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint()); | 1137 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint()); |
| 1156 compiler->GenerateCall(token_index(), try_index(), &label, | 1138 compiler->GenerateCall(token_index(), try_index(), &label, |
| 1157 PcDescriptors::kOther); | 1139 PcDescriptors::kOther); |
| 1158 __ Drop(2); // Discard type arguments and receiver. | 1140 __ Drop(2); // Discard type arguments and receiver. |
| 1159 } | 1141 } |
| 1160 | 1142 |
| 1143 |
| 1161 #undef __ | 1144 #undef __ |
| 1162 | 1145 |
| 1163 } // namespace dart | 1146 } // namespace dart |
| OLD | NEW |