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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 lib = Library::MathLibrary(); | 76 lib = Library::MathLibrary(); |
77 ASSERT(!lib.IsNull()); | 77 ASSERT(!lib.IsNull()); |
78 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 78 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
79 | 79 |
80 // Set up all dart:typed_data lib functions that can be intrisified. | 80 // Set up all dart:typed_data lib functions that can be intrisified. |
81 lib = Library::TypedDataLibrary(); | 81 lib = Library::TypedDataLibrary(); |
82 ASSERT(!lib.IsNull()); | 82 ASSERT(!lib.IsNull()); |
83 TYPED_DATA_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 83 TYPED_DATA_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
84 GRAPH_TYPED_DATA_INTRINSICS_LIST(SETUP_FUNCTION); | 84 GRAPH_TYPED_DATA_INTRINSICS_LIST(SETUP_FUNCTION); |
85 | 85 |
86 // Setup all dart:profiler lib functions that can be intrinsified. | 86 // Setup all dart:developer lib functions that can be intrinsified. |
87 lib = Library::ProfilerLibrary(); | 87 lib = Library::DeveloperLibrary(); |
88 ASSERT(!lib.IsNull()); | 88 ASSERT(!lib.IsNull()); |
89 PROFILER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 89 DEVELOPER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
90 | 90 |
91 #undef SETUP_FUNCTION | 91 #undef SETUP_FUNCTION |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 static void EmitCodeFor(FlowGraphCompiler* compiler, | 95 static void EmitCodeFor(FlowGraphCompiler* compiler, |
96 FlowGraph* graph) { | 96 FlowGraph* graph) { |
97 // The FlowGraph here is constructed by the intrinsics builder methods, and | 97 // The FlowGraph here is constructed by the intrinsics builder methods, and |
98 // is different from compiler->flow_graph(), the original method's flow graph. | 98 // is different from compiler->flow_graph(), the original method's flow graph. |
99 compiler->assembler()->Comment("Graph intrinsic"); | 99 compiler->assembler()->Comment("Graph intrinsic"); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 new Value(growable_array), | 683 new Value(growable_array), |
684 new Value(length), | 684 new Value(length), |
685 kNoStoreBarrier, | 685 kNoStoreBarrier, |
686 builder.TokenPos())); | 686 builder.TokenPos())); |
687 Definition* null_def = builder.AddNullDefinition(); | 687 Definition* null_def = builder.AddNullDefinition(); |
688 builder.AddIntrinsicReturn(new Value(null_def)); | 688 builder.AddIntrinsicReturn(new Value(null_def)); |
689 return true; | 689 return true; |
690 } | 690 } |
691 | 691 |
692 } // namespace dart | 692 } // namespace dart |
OLD | NEW |