| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 | 4 |
| 5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_allocator.h" | 10 #include "vm/flow_graph_allocator.h" |
| 11 #include "vm/flow_graph_builder.h" | 11 #include "vm/flow_graph_builder.h" |
| 12 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 13 #include "vm/flow_graph_optimizer.h" | 13 #include "vm/flow_graph_optimizer.h" |
| 14 #include "vm/locations.h" | 14 #include "vm/locations.h" |
| 15 #include "vm/object.h" | 15 #include "vm/object.h" |
| 16 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
| 17 #include "vm/os.h" | 17 #include "vm/os.h" |
| 18 #include "vm/resolver.h" |
| 18 #include "vm/scopes.h" | 19 #include "vm/scopes.h" |
| 19 #include "vm/stub_code.h" | 20 #include "vm/stub_code.h" |
| 20 #include "vm/symbols.h" | 21 #include "vm/symbols.h" |
| 21 | 22 |
| 22 namespace dart { | 23 namespace dart { |
| 23 | 24 |
| 24 DEFINE_FLAG(int, max_equality_polymorphic_checks, 32, | 25 DEFINE_FLAG(int, max_equality_polymorphic_checks, 32, |
| 25 "Maximum number of polymorphic checks in equality operator," | 26 "Maximum number of polymorphic checks in equality operator," |
| 26 " otherwise use megamorphic dispatch."); | 27 " otherwise use megamorphic dispatch."); |
| 27 DEFINE_FLAG(bool, new_identity_spec, true, | 28 DEFINE_FLAG(bool, new_identity_spec, true, |
| (...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2607 case kArrayCid: | 2608 case kArrayCid: |
| 2608 case kImmutableArrayCid: | 2609 case kImmutableArrayCid: |
| 2609 return Array::length_offset(); | 2610 return Array::length_offset(); |
| 2610 default: | 2611 default: |
| 2611 UNREACHABLE(); | 2612 UNREACHABLE(); |
| 2612 return -1; | 2613 return -1; |
| 2613 } | 2614 } |
| 2614 } | 2615 } |
| 2615 | 2616 |
| 2616 | 2617 |
| 2618 const Function& StringInterpolateInstr::CallFunction() const { |
| 2619 if (function_.IsNull()) { |
| 2620 const int kNumberOfArguments = 1; |
| 2621 const Array& kNoArgumentNames = Object::null_array(); |
| 2622 const Class& cls = |
| 2623 Class::Handle(Library::LookupCoreClass(Symbols::StringBase())); |
| 2624 ASSERT(!cls.IsNull()); |
| 2625 function_ = |
| 2626 Resolver::ResolveStatic( |
| 2627 cls, |
| 2628 Library::PrivateCoreLibName(Symbols::Interpolate()), |
| 2629 kNumberOfArguments, |
| 2630 kNoArgumentNames, |
| 2631 Resolver::kIsQualified); |
| 2632 } |
| 2633 ASSERT(!function_.IsNull()); |
| 2634 return function_; |
| 2635 } |
| 2636 |
| 2637 |
| 2617 InvokeMathCFunctionInstr::InvokeMathCFunctionInstr( | 2638 InvokeMathCFunctionInstr::InvokeMathCFunctionInstr( |
| 2618 ZoneGrowableArray<Value*>* inputs, | 2639 ZoneGrowableArray<Value*>* inputs, |
| 2619 intptr_t original_deopt_id, | 2640 intptr_t original_deopt_id, |
| 2620 MethodRecognizer::Kind recognized_kind) | 2641 MethodRecognizer::Kind recognized_kind) |
| 2621 : inputs_(inputs), | 2642 : inputs_(inputs), |
| 2622 locs_(NULL), | 2643 locs_(NULL), |
| 2623 recognized_kind_(recognized_kind) { | 2644 recognized_kind_(recognized_kind) { |
| 2624 ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_)); | 2645 ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_)); |
| 2625 for (intptr_t i = 0; i < inputs_->length(); ++i) { | 2646 for (intptr_t i = 0; i < inputs_->length(); ++i) { |
| 2626 ASSERT((*inputs)[i] != NULL); | 2647 ASSERT((*inputs)[i] != NULL); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2718 return kCosRuntimeEntry; | 2739 return kCosRuntimeEntry; |
| 2719 default: | 2740 default: |
| 2720 UNREACHABLE(); | 2741 UNREACHABLE(); |
| 2721 } | 2742 } |
| 2722 return kSinRuntimeEntry; | 2743 return kSinRuntimeEntry; |
| 2723 } | 2744 } |
| 2724 | 2745 |
| 2725 #undef __ | 2746 #undef __ |
| 2726 | 2747 |
| 2727 } // namespace dart | 2748 } // namespace dart |
| OLD | NEW |