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

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

Issue 619723004: Fix following compiler warnings: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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/os_win.cc ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 __ j(EQUAL, &ok, Assembler::kNearJump); 79 __ j(EQUAL, &ok, Assembler::kNearJump);
80 __ Stop("Not coming from Dart code."); 80 __ Stop("Not coming from Dart code.");
81 __ Bind(&ok); 81 __ Bind(&ok);
82 } 82 }
83 #endif 83 #endif
84 84
85 // Mark that the isolate is executing VM code. 85 // Mark that the isolate is executing VM code.
86 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX); 86 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX);
87 87
88 // Reserve space for arguments and align frame before entering C++ world. 88 // Reserve space for arguments and align frame before entering C++ world.
89 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments))); 89 __ AddImmediate(ESP, Immediate(0 - sizeof(NativeArguments)));
rmacnak 2014/09/30 22:39:50 I think these need a static_cast or there will be
siva 2014/09/30 23:05:35 Done.
90 if (OS::ActivationFrameAlignment() > 1) { 90 if (OS::ActivationFrameAlignment() > 1) {
91 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 91 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
92 } 92 }
93 93
94 // Pass NativeArguments structure by value and call runtime. 94 // Pass NativeArguments structure by value and call runtime.
95 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 95 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
96 // There are no runtime calls to closures, so we do not need to set the tag 96 // There are no runtime calls to closures, so we do not need to set the tag
97 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_. 97 // bits kClosureFunctionBit and kInstanceFunctionBit in argc_tag_.
98 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 98 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
99 __ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize)); // Compute argv. 99 __ leal(EAX, Address(EBP, EDX, TIMES_4, 1 * kWordSize)); // Compute argv.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 __ Bind(&ok); 203 __ Bind(&ok);
204 } 204 }
205 #endif 205 #endif
206 206
207 // Mark that the isolate is executing Native code. 207 // Mark that the isolate is executing Native code.
208 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX); 208 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX);
209 209
210 // Reserve space for the native arguments structure, the outgoing parameters 210 // Reserve space for the native arguments structure, the outgoing parameters
211 // (pointer to the native arguments structure, the C function entry point) 211 // (pointer to the native arguments structure, the C function entry point)
212 // and align frame before entering the C++ world. 212 // and align frame before entering the C++ world.
213 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - (2 * kWordSize))); 213 __ AddImmediate(ESP,
214 Immediate(0 - sizeof(NativeArguments) - (2 * kWordSize)));
214 if (OS::ActivationFrameAlignment() > 1) { 215 if (OS::ActivationFrameAlignment() > 1) {
215 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 216 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
216 } 217 }
217 218
218 // Pass NativeArguments structure by value and call native function. 219 // Pass NativeArguments structure by value and call native function.
219 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 220 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
220 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 221 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
221 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments. 222 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
222 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr. 223 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr.
223 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments. 224 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 __ Bind(&ok); 308 __ Bind(&ok);
308 } 309 }
309 #endif 310 #endif
310 311
311 // Mark that the isolate is executing Native code. 312 // Mark that the isolate is executing Native code.
312 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX); 313 __ movl(Address(CTX, Isolate::vm_tag_offset()), ECX);
313 314
314 // Reserve space for the native arguments structure, the outgoing parameter 315 // Reserve space for the native arguments structure, the outgoing parameter
315 // (pointer to the native arguments structure) and align frame before 316 // (pointer to the native arguments structure) and align frame before
316 // entering the C++ world. 317 // entering the C++ world.
317 __ AddImmediate(ESP, Immediate(-sizeof(NativeArguments) - kWordSize)); 318 __ AddImmediate(ESP, Immediate(0 - sizeof(NativeArguments) - kWordSize));
318 if (OS::ActivationFrameAlignment() > 1) { 319 if (OS::ActivationFrameAlignment() > 1) {
319 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 320 __ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
320 } 321 }
321 322
322 // Pass NativeArguments structure by value and call native function. 323 // Pass NativeArguments structure by value and call native function.
323 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs. 324 __ movl(Address(ESP, isolate_offset), CTX); // Set isolate in NativeArgs.
324 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments. 325 __ movl(Address(ESP, argc_tag_offset), EDX); // Set argc in NativeArguments.
325 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments. 326 __ movl(Address(ESP, argv_offset), EAX); // Set argv in NativeArguments.
326 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr. 327 __ leal(EAX, Address(EBP, 2 * kWordSize)); // Compute return value addr.
327 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments. 328 __ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 const Register temp = ECX; 2083 const Register temp = ECX;
2083 __ movl(left, Address(ESP, 2 * kWordSize)); 2084 __ movl(left, Address(ESP, 2 * kWordSize));
2084 __ movl(right, Address(ESP, 1 * kWordSize)); 2085 __ movl(right, Address(ESP, 1 * kWordSize));
2085 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2086 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2086 __ ret(); 2087 __ ret();
2087 } 2088 }
2088 2089
2089 } // namespace dart 2090 } // namespace dart
2090 2091
2091 #endif // defined TARGET_ARCH_IA32 2092 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/os_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698