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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } \ | 62 } \ |
63 func = cls.LookupFunctionAllowPrivate(str); \ | 63 func = cls.LookupFunctionAllowPrivate(str); \ |
64 } \ | 64 } \ |
65 ASSERT(!func.IsNull()); \ | 65 ASSERT(!func.IsNull()); \ |
66 func.set_is_intrinsic(true); | 66 func.set_is_intrinsic(true); |
67 | 67 |
68 // Set up all core lib functions that can be intrisified. | 68 // Set up all core lib functions that can be intrisified. |
69 lib = Library::CoreLibrary(); | 69 lib = Library::CoreLibrary(); |
70 ASSERT(!lib.IsNull()); | 70 ASSERT(!lib.IsNull()); |
71 CORE_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 71 CORE_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
| 72 CORE_REGEXP_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
72 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 73 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
73 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); | 74 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); |
74 | 75 |
75 // Set up all math lib functions that can be intrisified. | 76 // Set up all math lib functions that can be intrisified. |
76 lib = Library::MathLibrary(); | 77 lib = Library::MathLibrary(); |
77 ASSERT(!lib.IsNull()); | 78 ASSERT(!lib.IsNull()); |
78 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 79 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
79 | 80 |
80 // Set up all dart:typed_data lib functions that can be intrisified. | 81 // Set up all dart:typed_data lib functions that can be intrisified. |
81 lib = Library::TypedDataLibrary(); | 82 lib = Library::TypedDataLibrary(); |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 new LoadFieldInstr(new Value(backing_store), | 558 new LoadFieldInstr(new Value(backing_store), |
558 Array::length_offset(), | 559 Array::length_offset(), |
559 Type::ZoneHandle(), | 560 Type::ZoneHandle(), |
560 builder.TokenPos())); | 561 builder.TokenPos())); |
561 builder.AddIntrinsicReturn(new Value(capacity)); | 562 builder.AddIntrinsicReturn(new Value(capacity)); |
562 return true; | 563 return true; |
563 } | 564 } |
564 | 565 |
565 | 566 |
566 } // namespace dart | 567 } // namespace dart |
OLD | NEW |