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 if (FLAG_use_jscre) { | |
73 CORE_REGEXP_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | |
Ivan Posva
2014/11/14 08:42:49
Did you add an intrinsic for JSCRE?
zerny-google
2014/11/14 12:18:57
Yes. So I missed this because it is not compatible
| |
74 } | |
72 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 75 CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
73 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); | 76 GRAPH_CORE_INTRINSICS_LIST(SETUP_FUNCTION); |
74 | 77 |
75 // Set up all math lib functions that can be intrisified. | 78 // Set up all math lib functions that can be intrisified. |
76 lib = Library::MathLibrary(); | 79 lib = Library::MathLibrary(); |
77 ASSERT(!lib.IsNull()); | 80 ASSERT(!lib.IsNull()); |
78 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); | 81 MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION); |
79 | 82 |
80 // Set up all dart:typed_data lib functions that can be intrisified. | 83 // Set up all dart:typed_data lib functions that can be intrisified. |
81 lib = Library::TypedDataLibrary(); | 84 lib = Library::TypedDataLibrary(); |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
560 new LoadFieldInstr(new Value(backing_store), | 563 new LoadFieldInstr(new Value(backing_store), |
561 Array::length_offset(), | 564 Array::length_offset(), |
562 Type::ZoneHandle(), | 565 Type::ZoneHandle(), |
563 builder.TokenPos())); | 566 builder.TokenPos())); |
564 builder.AddIntrinsicReturn(new Value(capacity)); | 567 builder.AddIntrinsicReturn(new Value(capacity)); |
565 return true; | 568 return true; |
566 } | 569 } |
567 | 570 |
568 | 571 |
569 } // namespace dart | 572 } // namespace dart |
OLD | NEW |