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

Side by Side Diff: vm/code_patcher_x64_test.cc

Issue 10535180: Allow implicit 'close your eyes' of native methods. This will hopefully fix issue 3466. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 | « vm/code_patcher_ia32_test.cc ('k') | vm/dart_api_impl_test.cc » ('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/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 12 matching lines...) Expand all
23 const bool has_opt_params = false; 23 const bool has_opt_params = false;
24 const String& native_name = 24 const String& native_name =
25 String::ZoneHandle(String::NewSymbol("TestStaticCallPatching")); 25 String::ZoneHandle(String::NewSymbol("TestStaticCallPatching"));
26 NativeFunction native_function = reinterpret_cast<NativeFunction>( 26 NativeFunction native_function = reinterpret_cast<NativeFunction>(
27 NATIVE_ENTRY_FUNCTION(TestStaticCallPatching)); 27 NATIVE_ENTRY_FUNCTION(TestStaticCallPatching));
28 node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex, 28 node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
29 new NativeBodyNode(Scanner::kDummyTokenIndex, 29 new NativeBodyNode(Scanner::kDummyTokenIndex,
30 native_name, 30 native_name,
31 native_function, 31 native_function,
32 num_params, 32 num_params,
33 has_opt_params))); 33 has_opt_params,
34 false)));
34 } 35 }
35 36
36 CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) { 37 CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) {
37 SequenceNode* node_seq = test->node_sequence(); 38 SequenceNode* node_seq = test->node_sequence();
38 ArgumentListNode* arguments = new ArgumentListNode(Scanner::kDummyTokenIndex); 39 ArgumentListNode* arguments = new ArgumentListNode(Scanner::kDummyTokenIndex);
39 node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex, 40 node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
40 new StaticCallNode(Scanner::kDummyTokenIndex, 41 new StaticCallNode(Scanner::kDummyTokenIndex,
41 function, arguments))); 42 function, arguments)));
42 } 43 }
43 44
(...skipping 26 matching lines...) Expand all
70 CodePatcher::GetInstanceCallIcDataAt(return_address)); 71 CodePatcher::GetInstanceCallIcDataAt(return_address));
71 EXPECT_STREQ("targetFunction", 72 EXPECT_STREQ("targetFunction",
72 String::Handle(ic_data.target_name()).ToCString()); 73 String::Handle(ic_data.target_name()).ToCString());
73 EXPECT_EQ(1, ic_data.num_args_tested()); 74 EXPECT_EQ(1, ic_data.num_args_tested());
74 EXPECT_EQ(0, ic_data.NumberOfChecks()); 75 EXPECT_EQ(0, ic_data.NumberOfChecks());
75 } 76 }
76 77
77 } // namespace dart 78 } // namespace dart
78 79
79 #endif // TARGET_ARCH_X64 80 #endif // TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/code_patcher_ia32_test.cc ('k') | vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698