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

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

Issue 365983002: Make isolate specific stub code accessors instance methods instead (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/stub_code_mips.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_X64) 6 #if defined(TARGET_ARCH_X64)
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 __ LeaveStubFrame(); 351 __ LeaveStubFrame();
352 __ jmp(RAX); 352 __ jmp(RAX);
353 __ int3(); 353 __ int3();
354 } 354 }
355 355
356 356
357 // Input parameters: 357 // Input parameters:
358 // R10: smi-tagged argument count, may be zero. 358 // R10: smi-tagged argument count, may be zero.
359 // RBP[kParamEndSlotFromFp + 1]: last argument. 359 // RBP[kParamEndSlotFromFp + 1]: last argument.
360 static void PushArgumentsArray(Assembler* assembler) { 360 static void PushArgumentsArray(Assembler* assembler) {
361 StubCode* stub_code = Isolate::Current()->stub_code();
362
361 __ LoadObject(R12, Object::null_object(), PP); 363 __ LoadObject(R12, Object::null_object(), PP);
362 // Allocate array to store arguments of caller. 364 // Allocate array to store arguments of caller.
363 __ movq(RBX, R12); // Null element type for raw Array. 365 __ movq(RBX, R12); // Null element type for raw Array.
364 __ call(&StubCode::AllocateArrayLabel()); 366 __ call(&stub_code->AllocateArrayLabel());
365 __ SmiUntag(R10); 367 __ SmiUntag(R10);
366 // RAX: newly allocated array. 368 // RAX: newly allocated array.
367 // R10: length of the array (was preserved by the stub). 369 // R10: length of the array (was preserved by the stub).
368 __ pushq(RAX); // Array is in RAX and on top of stack. 370 __ pushq(RAX); // Array is in RAX and on top of stack.
369 __ leaq(R12, Address(RBP, R10, TIMES_8, kParamEndSlotFromFp * kWordSize)); 371 __ leaq(R12, Address(RBP, R10, TIMES_8, kParamEndSlotFromFp * kWordSize));
370 __ leaq(RBX, FieldAddress(RAX, Array::data_offset())); 372 __ leaq(RBX, FieldAddress(RAX, Array::data_offset()));
371 // R12: address of first argument on stack. 373 // R12: address of first argument on stack.
372 // RBX: address of first argument in array. 374 // RBX: address of first argument in array.
373 Label loop, loop_condition; 375 Label loop, loop_condition;
374 __ jmp(&loop_condition, Assembler::kNearJump); 376 __ jmp(&loop_condition, Assembler::kNearJump);
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 1860
1859 __ movq(left, Address(RSP, 2 * kWordSize)); 1861 __ movq(left, Address(RSP, 2 * kWordSize));
1860 __ movq(right, Address(RSP, 1 * kWordSize)); 1862 __ movq(right, Address(RSP, 1 * kWordSize));
1861 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 1863 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
1862 __ ret(); 1864 __ ret();
1863 } 1865 }
1864 1866
1865 } // namespace dart 1867 } // namespace dart
1866 1868
1867 #endif // defined TARGET_ARCH_X64 1869 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698