Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Side by Side Diff: runtime/vm/native_entry_test.cc

Issue 9475031: Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698