| 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/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
| (...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2927 is_native, | 2927 is_native, |
| 2928 cls, | 2928 cls, |
| 2929 0); | 2929 0); |
| 2930 } | 2930 } |
| 2931 | 2931 |
| 2932 | 2932 |
| 2933 TEST_CASE(ICData) { | 2933 TEST_CASE(ICData) { |
| 2934 Function& function = Function::Handle(GetDummyTarget("Bern")); | 2934 Function& function = Function::Handle(GetDummyTarget("Bern")); |
| 2935 const intptr_t id = 12; | 2935 const intptr_t id = 12; |
| 2936 const intptr_t num_args_tested = 1; | 2936 const intptr_t num_args_tested = 1; |
| 2937 const String& target_name = String::Handle(String::New("Thun")); | 2937 const String& target_name = String::Handle(Symbols::New("Thun")); |
| 2938 const Array& args_descriptor = | 2938 const Array& args_descriptor = |
| 2939 Array::Handle(ArgumentsDescriptor::New(1, Object::null_array())); | 2939 Array::Handle(ArgumentsDescriptor::New(1, Object::null_array())); |
| 2940 ICData& o1 = ICData::Handle(); | 2940 ICData& o1 = ICData::Handle(); |
| 2941 o1 = ICData::New(function, target_name, args_descriptor, id, num_args_tested); | 2941 o1 = ICData::New(function, target_name, args_descriptor, id, num_args_tested); |
| 2942 EXPECT_EQ(1, o1.NumArgsTested()); | 2942 EXPECT_EQ(1, o1.NumArgsTested()); |
| 2943 EXPECT_EQ(id, o1.deopt_id()); | 2943 EXPECT_EQ(id, o1.deopt_id()); |
| 2944 EXPECT_EQ(function.raw(), o1.owner()); | 2944 EXPECT_EQ(function.raw(), o1.owner()); |
| 2945 EXPECT_EQ(0, o1.NumberOfChecks()); | 2945 EXPECT_EQ(0, o1.NumberOfChecks()); |
| 2946 EXPECT_EQ(target_name.raw(), o1.target_name()); | 2946 EXPECT_EQ(target_name.raw(), o1.target_name()); |
| 2947 EXPECT_EQ(args_descriptor.raw(), o1.arguments_descriptor()); | 2947 EXPECT_EQ(args_descriptor.raw(), o1.arguments_descriptor()); |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4245 EXPECT_VALID(h_result); | 4245 EXPECT_VALID(h_result); |
| 4246 Integer& result = Integer::Handle(); | 4246 Integer& result = Integer::Handle(); |
| 4247 result ^= Api::UnwrapHandle(h_result); | 4247 result ^= Api::UnwrapHandle(h_result); |
| 4248 String& foo = String::Handle(String::New("foo")); | 4248 String& foo = String::Handle(String::New("foo")); |
| 4249 Integer& expected = Integer::Handle(); | 4249 Integer& expected = Integer::Handle(); |
| 4250 expected ^= foo.HashCode(); | 4250 expected ^= foo.HashCode(); |
| 4251 EXPECT(result.IsIdenticalTo(expected)); | 4251 EXPECT(result.IsIdenticalTo(expected)); |
| 4252 } | 4252 } |
| 4253 | 4253 |
| 4254 } // namespace dart | 4254 } // namespace dart |
| OLD | NEW |