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

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

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 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
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.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_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 27 matching lines...) Expand all
38 const Array& args_descriptor = Array::Handle( 38 const Array& args_descriptor = Array::Handle(
39 ArgumentsDescriptor::New(kTypeArgsLen, kNumArgs, Object::null_array())); 39 ArgumentsDescriptor::New(kTypeArgsLen, kNumArgs, Object::null_array()));
40 const ICData& ic_data = ICData::ZoneHandle( 40 const ICData& ic_data = ICData::ZoneHandle(
41 ICData::New(function, target_name, args_descriptor, 15, 1, false)); 41 ICData::New(function, target_name, args_descriptor, 15, 1, false));
42 42
43 __ LoadObject(ECX, ic_data); 43 __ LoadObject(ECX, ic_data);
44 __ Call(*StubCode::OneArgCheckInlineCache_entry()); 44 __ Call(*StubCode::OneArgCheckInlineCache_entry());
45 __ ret(); 45 __ ret();
46 } 46 }
47 47
48
49 ASSEMBLER_TEST_RUN(IcDataAccess, test) { 48 ASSEMBLER_TEST_RUN(IcDataAccess, test) {
50 uword return_address = test->entry() + CodePatcher::InstanceCallSizeInBytes(); 49 uword return_address = test->entry() + CodePatcher::InstanceCallSizeInBytes();
51 ICData& ic_data = ICData::Handle(); 50 ICData& ic_data = ICData::Handle();
52 CodePatcher::GetInstanceCallAt(return_address, test->code(), &ic_data); 51 CodePatcher::GetInstanceCallAt(return_address, test->code(), &ic_data);
53 EXPECT_STREQ("targetFunction", 52 EXPECT_STREQ("targetFunction",
54 String::Handle(ic_data.target_name()).ToCString()); 53 String::Handle(ic_data.target_name()).ToCString());
55 EXPECT_EQ(1, ic_data.NumArgsTested()); 54 EXPECT_EQ(1, ic_data.NumArgsTested());
56 EXPECT_EQ(0, ic_data.NumberOfChecks()); 55 EXPECT_EQ(0, ic_data.NumberOfChecks());
57 } 56 }
58 57
59 } // namespace dart 58 } // namespace dart
60 59
61 #endif // TARGET_ARCH_IA32 60 #endif // TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698