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

Side by Side Diff: runtime/vm/object_arm64_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/object.cc ('k') | runtime/vm/object_arm_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 #if defined(TARGET_ARCH_ARM64) 7 #if defined(TARGET_ARCH_ARM64)
8 8
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 12 matching lines...) Expand all
23 __ add(R0, R0, Operand(1)); 23 __ add(R0, R0, Operand(1));
24 __ str(R0, Address(SP)); 24 __ str(R0, Address(SP));
25 __ ldr(R1, Address(SP)); 25 __ ldr(R1, Address(SP));
26 __ add(R1, R1, Operand(1)); 26 __ add(R1, R1, Operand(1));
27 __ Pop(R0); 27 __ Pop(R0);
28 __ mov(R0, R1); 28 __ mov(R0, R1);
29 __ LeaveFrame(); 29 __ LeaveFrame();
30 __ ret(); 30 __ ret();
31 } 31 }
32 32
33
34 // Generate a dart code sequence that embeds a string object in it. 33 // Generate a dart code sequence that embeds a string object in it.
35 // This is used to test Embedded String objects in the instructions. 34 // This is used to test Embedded String objects in the instructions.
36 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) { 35 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
37 const String& string_object = 36 const String& string_object =
38 String::ZoneHandle(String::New(str, Heap::kOld)); 37 String::ZoneHandle(String::New(str, Heap::kOld));
39 __ EnterStubFrame(); 38 __ EnterStubFrame();
40 __ LoadObject(R0, string_object); 39 __ LoadObject(R0, string_object);
41 __ LeaveStubFrame(); 40 __ LeaveStubFrame();
42 __ ret(); 41 __ ret();
43 } 42 }
44 43
45
46 // Generate a dart code sequence that embeds a smi object in it. 44 // Generate a dart code sequence that embeds a smi object in it.
47 // This is used to test Embedded Smi objects in the instructions. 45 // This is used to test Embedded Smi objects in the instructions.
48 void GenerateEmbedSmiInCode(Assembler* assembler, intptr_t value) { 46 void GenerateEmbedSmiInCode(Assembler* assembler, intptr_t value) {
49 const Smi& smi_object = Smi::ZoneHandle(Smi::New(value)); 47 const Smi& smi_object = Smi::ZoneHandle(Smi::New(value));
50 const int64_t val = reinterpret_cast<int64_t>(smi_object.raw()); 48 const int64_t val = reinterpret_cast<int64_t>(smi_object.raw());
51 __ LoadImmediate(R0, val); 49 __ LoadImmediate(R0, val);
52 __ ret(); 50 __ ret();
53 } 51 }
54 52
55 } // namespace dart 53 } // namespace dart
56 54
57 #endif // defined TARGET_ARCH_ARM64 55 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698