| 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 // Class for intrinsifying functions. | 4 // Class for intrinsifying functions. |
| 5 | 5 |
| 6 #include "vm/assembler.h" | 6 #include "vm/assembler.h" |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
| 10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 Instance::ElementSizeFor(kArrayCid), // index scale | 763 Instance::ElementSizeFor(kArrayCid), // index scale |
| 764 kArrayCid, | 764 kArrayCid, |
| 765 Thread::kNoDeoptId, | 765 Thread::kNoDeoptId, |
| 766 builder.TokenPos())); | 766 builder.TokenPos())); |
| 767 builder.AddIntrinsicReturn(new Value(result)); | 767 builder.AddIntrinsicReturn(new Value(result)); |
| 768 return true; | 768 return true; |
| 769 } | 769 } |
| 770 | 770 |
| 771 | 771 |
| 772 bool Intrinsifier::Build_GrowableArraySetIndexed(FlowGraph* flow_graph) { | 772 bool Intrinsifier::Build_GrowableArraySetIndexed(FlowGraph* flow_graph) { |
| 773 if (Isolate::Current()->flags().type_checks()) { | 773 if (Isolate::Current()->type_checks()) { |
| 774 return false; | 774 return false; |
| 775 } | 775 } |
| 776 | 776 |
| 777 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); | 777 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
| 778 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); | 778 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
| 779 BlockBuilder builder(flow_graph, normal_entry); | 779 BlockBuilder builder(flow_graph, normal_entry); |
| 780 | 780 |
| 781 Definition* value = builder.AddParameter(1); | 781 Definition* value = builder.AddParameter(1); |
| 782 Definition* index = builder.AddParameter(2); | 782 Definition* index = builder.AddParameter(2); |
| 783 Definition* array = builder.AddParameter(3); | 783 Definition* array = builder.AddParameter(3); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 new UnaryDoubleOpInstr(Token::kNEGATE, | 877 new UnaryDoubleOpInstr(Token::kNEGATE, |
| 878 new Value(unboxed_value), | 878 new Value(unboxed_value), |
| 879 Thread::kNoDeoptId)); | 879 Thread::kNoDeoptId)); |
| 880 Definition* result = builder.AddDefinition( | 880 Definition* result = builder.AddDefinition( |
| 881 BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result))); | 881 BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result))); |
| 882 builder.AddIntrinsicReturn(new Value(result)); | 882 builder.AddIntrinsicReturn(new Value(result)); |
| 883 return true; | 883 return true; |
| 884 } | 884 } |
| 885 | 885 |
| 886 } // namespace dart | 886 } // namespace dart |
| OLD | NEW |