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

Side by Side Diff: vm/stub_code_x64.cc

Issue 11087070: - Get rid of RawClosure class and use RawInstance for closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/stub_code_ia32.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 // next object start and initialize the object. 1351 // next object start and initialize the object.
1352 __ movq(RDI, Immediate(heap->TopAddress())); 1352 __ movq(RDI, Immediate(heap->TopAddress()));
1353 __ movq(Address(RDI, 0), R13); 1353 __ movq(Address(RDI, 0), R13);
1354 1354
1355 // RAX: new closure object. 1355 // RAX: new closure object.
1356 // RBX: new context object (only if is_implicit_closure). 1356 // RBX: new context object (only if is_implicit_closure).
1357 // Set the tags. 1357 // Set the tags.
1358 uword tags = 0; 1358 uword tags = 0;
1359 tags = RawObject::SizeTag::update(closure_size, tags); 1359 tags = RawObject::SizeTag::update(closure_size, tags);
1360 tags = RawObject::ClassIdTag::update(cls.id(), tags); 1360 tags = RawObject::ClassIdTag::update(cls.id(), tags);
1361 __ movq(Address(RAX, Closure::tags_offset()), Immediate(tags)); 1361 __ movq(Address(RAX, Instance::tags_offset()), Immediate(tags));
1362 1362
1363 // Initialize the function field in the object. 1363 // Initialize the function field in the object.
1364 // RAX: new closure object. 1364 // RAX: new closure object.
1365 // RBX: new context object (only if is_implicit_closure). 1365 // RBX: new context object (only if is_implicit_closure).
1366 // R13: next object start. 1366 // R13: next object start.
1367 __ LoadObject(R10, func); // Load function of closure to be allocated. 1367 __ LoadObject(R10, func); // Load function of closure to be allocated.
1368 __ movq(Address(RAX, Closure::function_offset()), R10); 1368 __ movq(Address(RAX, Closure::function_offset()), R10);
1369 1369
1370 // Setup the context for this closure. 1370 // Setup the context for this closure.
1371 if (is_implicit_static_closure) { 1371 if (is_implicit_static_closure) {
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 __ CallRuntime(kUpdateICDataTwoArgsRuntimeEntry); 2013 __ CallRuntime(kUpdateICDataTwoArgsRuntimeEntry);
2014 __ Drop(4); 2014 __ Drop(4);
2015 __ LeaveFrame(); 2015 __ LeaveFrame();
2016 2016
2017 __ jmp(&compute_result, Assembler::kNearJump); 2017 __ jmp(&compute_result, Assembler::kNearJump);
2018 } 2018 }
2019 2019
2020 } // namespace dart 2020 } // namespace dart
2021 2021
2022 #endif // defined TARGET_ARCH_X64 2022 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698