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 | 4 |
5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 2905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2916 EXPECT_EQ(RawPcDescriptors::kOther, iter.Kind()); | 2916 EXPECT_EQ(RawPcDescriptors::kOther, iter.Kind()); |
2917 | 2917 |
2918 EXPECT_EQ(false, iter.MoveNext()); | 2918 EXPECT_EQ(false, iter.MoveNext()); |
2919 } | 2919 } |
2920 | 2920 |
2921 | 2921 |
2922 TEST_CASE(PcDescriptorsCompressed) { | 2922 TEST_CASE(PcDescriptorsCompressed) { |
2923 const int kNumEntries = 6; | 2923 const int kNumEntries = 6; |
2924 // Add PcDescriptors to the code. | 2924 // Add PcDescriptors to the code. |
2925 PcDescriptors& descriptors = PcDescriptors::Handle(); | 2925 PcDescriptors& descriptors = PcDescriptors::Handle(); |
2926 // PcDescritpors have no try-index. | 2926 // PcDescriptors have no try-index. |
2927 descriptors ^= PcDescriptors::New(kNumEntries, false); | 2927 descriptors ^= PcDescriptors::New(kNumEntries, false); |
2928 descriptors.AddDescriptor(0, 10, RawPcDescriptors::kOther, 1, 20, -1); | 2928 descriptors.AddDescriptor(0, 10, RawPcDescriptors::kOther, 1, 20, -1); |
2929 descriptors.AddDescriptor(1, 20, RawPcDescriptors::kDeopt, 2, 30, -1); | 2929 descriptors.AddDescriptor(1, 20, RawPcDescriptors::kDeopt, 2, 30, -1); |
2930 descriptors.AddDescriptor(2, 30, RawPcDescriptors::kOther, 3, 40, -1); | 2930 descriptors.AddDescriptor(2, 30, RawPcDescriptors::kOther, 3, 40, -1); |
2931 descriptors.AddDescriptor(3, 10, RawPcDescriptors::kOther, 4, 40, -1); | 2931 descriptors.AddDescriptor(3, 10, RawPcDescriptors::kOther, 4, 40, -1); |
2932 descriptors.AddDescriptor(4, 10, RawPcDescriptors::kOther, 5, 80, -1); | 2932 descriptors.AddDescriptor(4, 10, RawPcDescriptors::kOther, 5, 80, -1); |
2933 descriptors.AddDescriptor(5, 80, RawPcDescriptors::kOther, 6, 150, -1); | 2933 descriptors.AddDescriptor(5, 80, RawPcDescriptors::kOther, 6, 150, -1); |
2934 | 2934 |
2935 extern void GenerateIncrement(Assembler* assembler); | 2935 extern void GenerateIncrement(Assembler* assembler); |
2936 Assembler _assembler_; | 2936 Assembler _assembler_; |
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4578 EXPECT_VALID(h_result); | 4578 EXPECT_VALID(h_result); |
4579 Integer& result = Integer::Handle(); | 4579 Integer& result = Integer::Handle(); |
4580 result ^= Api::UnwrapHandle(h_result); | 4580 result ^= Api::UnwrapHandle(h_result); |
4581 String& foo = String::Handle(String::New("foo")); | 4581 String& foo = String::Handle(String::New("foo")); |
4582 Integer& expected = Integer::Handle(); | 4582 Integer& expected = Integer::Handle(); |
4583 expected ^= foo.HashCode(); | 4583 expected ^= foo.HashCode(); |
4584 EXPECT(result.IsIdenticalTo(expected)); | 4584 EXPECT(result.IsIdenticalTo(expected)); |
4585 } | 4585 } |
4586 | 4586 |
4587 } // namespace dart | 4587 } // namespace dart |
OLD | NEW |