| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 __ LoadObject(RBX, ic_data); | 64 __ LoadObject(RBX, ic_data); |
| 65 __ LoadObject(R10, arg_descriptor); | 65 __ LoadObject(R10, arg_descriptor); |
| 66 ExternalLabel target_label( | 66 ExternalLabel target_label( |
| 67 "InlineCache", StubCode::OneArgCheckInlineCacheEntryPoint()); | 67 "InlineCache", StubCode::OneArgCheckInlineCacheEntryPoint()); |
| 68 __ call(&target_label); | 68 __ call(&target_label); |
| 69 __ ret(); | 69 __ ret(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 ASSEMBLER_TEST_RUN(IcDataAccess, entry) { | 73 ASSEMBLER_TEST_RUN(IcDataAccess, test) { |
| 74 uword return_address = entry + CodePatcher::InstanceCallSizeInBytes(); | 74 uword return_address = test->entry() + CodePatcher::InstanceCallSizeInBytes(); |
| 75 ICData& ic_data = ICData::Handle(); | 75 ICData& ic_data = ICData::Handle(); |
| 76 CodePatcher::GetInstanceCallAt(return_address, &ic_data, NULL); | 76 CodePatcher::GetInstanceCallAt(return_address, test->code(), &ic_data, NULL); |
| 77 EXPECT_STREQ("targetFunction", | 77 EXPECT_STREQ("targetFunction", |
| 78 String::Handle(ic_data.target_name()).ToCString()); | 78 String::Handle(ic_data.target_name()).ToCString()); |
| 79 EXPECT_EQ(1, ic_data.num_args_tested()); | 79 EXPECT_EQ(1, ic_data.num_args_tested()); |
| 80 EXPECT_EQ(0, ic_data.NumberOfChecks()); | 80 EXPECT_EQ(0, ic_data.NumberOfChecks()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace dart | 83 } // namespace dart |
| 84 | 84 |
| 85 #endif // TARGET_ARCH_X64 | 85 #endif // TARGET_ARCH_X64 |
| OLD | NEW |