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/intrinsifier.h" | 7 #include "vm/intrinsifier.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/symbols.h" | 10 #include "vm/symbols.h" |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 Instance::ElementSizeFor(kArrayCid), // index scale | 589 Instance::ElementSizeFor(kArrayCid), // index scale |
590 kArrayCid, | 590 kArrayCid, |
591 Isolate::kNoDeoptId, | 591 Isolate::kNoDeoptId, |
592 builder.TokenPos())); | 592 builder.TokenPos())); |
593 builder.AddIntrinsicReturn(new Value(result)); | 593 builder.AddIntrinsicReturn(new Value(result)); |
594 return true; | 594 return true; |
595 } | 595 } |
596 | 596 |
597 | 597 |
598 bool Intrinsifier::Build_GrowableArraySetIndexed(FlowGraph* flow_graph) { | 598 bool Intrinsifier::Build_GrowableArraySetIndexed(FlowGraph* flow_graph) { |
599 if (FLAG_enable_type_checks) return false; | 599 if (Isolate::Current()->TypeChecksEnabled()) { |
| 600 return false; |
| 601 } |
600 | 602 |
601 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); | 603 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
602 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); | 604 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
603 BlockBuilder builder(flow_graph, normal_entry); | 605 BlockBuilder builder(flow_graph, normal_entry); |
604 | 606 |
605 Definition* value = builder.AddParameter(1); | 607 Definition* value = builder.AddParameter(1); |
606 Definition* index = builder.AddParameter(2); | 608 Definition* index = builder.AddParameter(2); |
607 Definition* array = builder.AddParameter(3); | 609 Definition* array = builder.AddParameter(3); |
608 | 610 |
609 PrepareIndexedOp( | 611 PrepareIndexedOp( |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 new Value(growable_array), | 684 new Value(growable_array), |
683 new Value(length), | 685 new Value(length), |
684 kNoStoreBarrier, | 686 kNoStoreBarrier, |
685 builder.TokenPos())); | 687 builder.TokenPos())); |
686 Definition* null_def = builder.AddNullDefinition(); | 688 Definition* null_def = builder.AddNullDefinition(); |
687 builder.AddIntrinsicReturn(new Value(null_def)); | 689 builder.AddIntrinsicReturn(new Value(null_def)); |
688 return true; | 690 return true; |
689 } | 691 } |
690 | 692 |
691 } // namespace dart | 693 } // namespace dart |
OLD | NEW |