| 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/native_entry_test.h" | 5 #include "vm/native_entry_test.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 Function& target_function = Function::Handle(); | 76 Function& target_function = Function::Handle(); |
| 77 DartFrameIterator iterator; | 77 DartFrameIterator iterator; |
| 78 iterator.NextFrame(); // Skip native call. | 78 iterator.NextFrame(); // Skip native call. |
| 79 DartFrame* static_caller_frame = iterator.NextFrame(); | 79 DartFrame* static_caller_frame = iterator.NextFrame(); |
| 80 CodePatcher::GetStaticCallAt(static_caller_frame->pc(), | 80 CodePatcher::GetStaticCallAt(static_caller_frame->pc(), |
| 81 &target_function, | 81 &target_function, |
| 82 &target_address); | 82 &target_address); |
| 83 EXPECT(String::Handle(target_function.name()). | 83 EXPECT(String::Handle(target_function.name()). |
| 84 Equals(String::Handle(String::New("NativePatchStaticCall")))); | 84 Equals(String::Handle(String::New("NativePatchStaticCall")))); |
| 85 const uword function_entry_address = | 85 const uword function_entry_address = |
| 86 Code::Handle(target_function.code()).EntryPoint(); | 86 Code::Handle(target_function.CurrentCode()).EntryPoint(); |
| 87 EXPECT_EQ(function_entry_address, target_address); | 87 EXPECT_EQ(function_entry_address, target_address); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace dart | 90 } // namespace dart |
| OLD | NEW |