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

Side by Side Diff: vm/assembler_macros_ia32.cc

Issue 10827209: Unify class ids and snapshot object ids list so that we don't have disparate and sometimes confusin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | « no previous file | vm/assembler_macros_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_macros.h" 8 #include "vm/assembler_macros.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 18 matching lines...) Expand all
29 // instance_reg: potential next object start. 29 // instance_reg: potential next object start.
30 __ cmpl(instance_reg, Address::Absolute(heap->EndAddress())); 30 __ cmpl(instance_reg, Address::Absolute(heap->EndAddress()));
31 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump); 31 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump);
32 // Successfully allocated the object, now update top to point to 32 // Successfully allocated the object, now update top to point to
33 // next object start and store the class in the class field of object. 33 // next object start and store the class in the class field of object.
34 __ movl(Address::Absolute(heap->TopAddress()), instance_reg); 34 __ movl(Address::Absolute(heap->TopAddress()), instance_reg);
35 ASSERT(instance_size >= kHeapObjectTag); 35 ASSERT(instance_size >= kHeapObjectTag);
36 __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag)); 36 __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag));
37 uword tags = 0; 37 uword tags = 0;
38 tags = RawObject::SizeTag::update(instance_size, tags); 38 tags = RawObject::SizeTag::update(instance_size, tags);
39 ASSERT(cls.id() != kIllegalObjectKind); 39 ASSERT(cls.id() != kIllegalCid);
40 tags = RawObject::ClassIdTag::update(cls.id(), tags); 40 tags = RawObject::ClassIdTag::update(cls.id(), tags);
41 __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags)); 41 __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags));
42 } else { 42 } else {
43 __ jmp(failure); 43 __ jmp(failure);
44 } 44 }
45 } 45 }
46 46
47 47
48 void AssemblerMacros::EnterDartFrame(Assembler* assembler, 48 void AssemblerMacros::EnterDartFrame(Assembler* assembler,
49 intptr_t frame_size) { 49 intptr_t frame_size) {
(...skipping 30 matching lines...) Expand all
80 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { 80 void AssemblerMacros::EnterStubFrame(Assembler* assembler) {
81 __ EnterFrame(0); 81 __ EnterFrame(0);
82 __ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames. 82 __ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames.
83 } 83 }
84 84
85 #undef __ 85 #undef __
86 86
87 } // namespace dart 87 } // namespace dart
88 88
89 #endif // defined TARGET_ARCH_IA32 89 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/assembler_macros_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698