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

Side by Side Diff: vm/stub_code_ia32.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/snapshot.cc ('k') | vm/stub_code_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) 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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 // Successfully allocated the object, now update top to point to 1369 // Successfully allocated the object, now update top to point to
1370 // next object start and initialize the object. 1370 // next object start and initialize the object.
1371 __ movl(Address::Absolute(heap->TopAddress()), EBX); 1371 __ movl(Address::Absolute(heap->TopAddress()), EBX);
1372 1372
1373 // EAX: new closure object. 1373 // EAX: new closure object.
1374 // ECX: new context object (only if is_implicit_closure). 1374 // ECX: new context object (only if is_implicit_closure).
1375 // Set the tags. 1375 // Set the tags.
1376 uword tags = 0; 1376 uword tags = 0;
1377 tags = RawObject::SizeTag::update(closure_size, tags); 1377 tags = RawObject::SizeTag::update(closure_size, tags);
1378 tags = RawObject::ClassIdTag::update(cls.id(), tags); 1378 tags = RawObject::ClassIdTag::update(cls.id(), tags);
1379 __ movl(Address(EAX, Closure::tags_offset()), Immediate(tags)); 1379 __ movl(Address(EAX, Instance::tags_offset()), Immediate(tags));
1380 1380
1381 // Initialize the function field in the object. 1381 // Initialize the function field in the object.
1382 // EAX: new closure object. 1382 // EAX: new closure object.
1383 // ECX: new context object (only if is_implicit_closure). 1383 // ECX: new context object (only if is_implicit_closure).
1384 // EBX: next object start. 1384 // EBX: next object start.
1385 __ LoadObject(EDX, func); // Load function of closure to be allocated. 1385 __ LoadObject(EDX, func); // Load function of closure to be allocated.
1386 __ movl(Address(EAX, Closure::function_offset()), EDX); 1386 __ movl(Address(EAX, Closure::function_offset()), EDX);
1387 1387
1388 // Setup the context for this closure. 1388 // Setup the context for this closure.
1389 if (is_implicit_static_closure) { 1389 if (is_implicit_static_closure) {
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 __ Drop(4); 2050 __ Drop(4);
2051 __ LeaveFrame(); 2051 __ LeaveFrame();
2052 2052
2053 __ jmp(&compute_result, Assembler::kNearJump); 2053 __ jmp(&compute_result, Assembler::kNearJump);
2054 } 2054 }
2055 2055
2056 2056
2057 } // namespace dart 2057 } // namespace dart
2058 2058
2059 #endif // defined TARGET_ARCH_IA32 2059 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « vm/snapshot.cc ('k') | vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698