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

Side by Side Diff: vm/code_patcher_ia32_test.cc

Issue 10808064: Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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_generator_test.cc ('k') | vm/code_patcher_x64_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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 CODEGEN_TEST2_RUN(PatchStaticCall, NativePatchStaticCall, Instance::null()); 45 CODEGEN_TEST2_RUN(PatchStaticCall, NativePatchStaticCall, Instance::null());
46 46
47 #define __ assembler-> 47 #define __ assembler->
48 48
49 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) { 49 ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
50 const String& function_name = 50 const String& function_name =
51 String::ZoneHandle(String::NewSymbol("callerFunction")); 51 String::ZoneHandle(String::NewSymbol("callerFunction"));
52 const Function& function = Function::ZoneHandle( 52 const Function& function = Function::ZoneHandle(
53 Function::New(function_name, RawFunction::kFunction, true, false, 0)); 53 Function::New(function_name, RawFunction::kRegularFunction,
54 true, false, 0));
54 55
55 const String& target_name = String::Handle(String::New("targetFunction")); 56 const String& target_name = String::Handle(String::New("targetFunction"));
56 ICData& ic_data = ICData::ZoneHandle( 57 ICData& ic_data = ICData::ZoneHandle(
57 ICData::New(function, target_name, 15, 1)); 58 ICData::New(function, target_name, 15, 1));
58 __ LoadObject(ECX, ic_data); 59 __ LoadObject(ECX, ic_data);
59 __ LoadObject(EDX, DartEntry::ArgumentsDescriptor(1, Array::Handle())); 60 __ LoadObject(EDX, DartEntry::ArgumentsDescriptor(1, Array::Handle()));
60 ExternalLabel target_label( 61 ExternalLabel target_label(
61 "InlineCache", StubCode::OneArgCheckInlineCacheEntryPoint()); 62 "InlineCache", StubCode::OneArgCheckInlineCacheEntryPoint());
62 __ call(&target_label); 63 __ call(&target_label);
63 __ ret(); 64 __ ret();
64 } 65 }
65 66
66 67
67 ASSEMBLER_TEST_RUN(IcDataAccess, entry) { 68 ASSEMBLER_TEST_RUN(IcDataAccess, entry) {
68 uword return_address = entry + CodePatcher::InstanceCallSizeInBytes(); 69 uword return_address = entry + CodePatcher::InstanceCallSizeInBytes();
69 const ICData& ic_data = ICData::Handle( 70 const ICData& ic_data = ICData::Handle(
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_IA32 80 #endif // TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « vm/code_generator_test.cc ('k') | vm/code_patcher_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698