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

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

Issue 1241113002: VM: Fix allocation size stats for contexts on ia32 and x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | runtime/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) 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 #endif // DEBUG 870 #endif // DEBUG
871 __ j(ABOVE_EQUAL, &slow_case, kJumpLength); 871 __ j(ABOVE_EQUAL, &slow_case, kJumpLength);
872 } 872 }
873 873
874 // Successfully allocated the object, now update top to point to 874 // Successfully allocated the object, now update top to point to
875 // next object start and initialize the object. 875 // next object start and initialize the object.
876 // EAX: new object. 876 // EAX: new object.
877 // EBX: next object start. 877 // EBX: next object start.
878 // EDX: number of context variables. 878 // EDX: number of context variables.
879 __ movl(Address(ECX, Heap::TopOffset(space)), EBX); 879 __ movl(Address(ECX, Heap::TopOffset(space)), EBX);
880 __ addl(EAX, Immediate(kHeapObjectTag));
881 // EBX: Size of allocation in bytes. 880 // EBX: Size of allocation in bytes.
882 __ subl(EBX, EAX); 881 __ subl(EBX, EAX);
882 __ addl(EAX, Immediate(kHeapObjectTag));
883 // Generate isolate-independent code to allow sharing between isolates. 883 // Generate isolate-independent code to allow sharing between isolates.
884 __ UpdateAllocationStatsWithSize(cid, EBX, EDI, space, 884 __ UpdateAllocationStatsWithSize(cid, EBX, EDI, space,
885 /* inline_isolate = */ false); 885 /* inline_isolate = */ false);
886 886
887 // Calculate the size tag. 887 // Calculate the size tag.
888 // EAX: new object. 888 // EAX: new object.
889 // EDX: number of context variables. 889 // EDX: number of context variables.
890 { 890 {
891 Label size_tag_overflow, done; 891 Label size_tag_overflow, done;
892 __ leal(EBX, Address(EDX, TIMES_4, fixed_size)); 892 __ leal(EBX, Address(EDX, TIMES_4, fixed_size));
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 // EBX: entry point. 2127 // EBX: entry point.
2128 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { 2128 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) {
2129 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); 2129 EmitMegamorphicLookup(assembler, EDI, EBX, EBX);
2130 __ ret(); 2130 __ ret();
2131 } 2131 }
2132 2132
2133 2133
2134 } // namespace dart 2134 } // namespace dart
2135 2135
2136 #endif // defined TARGET_ARCH_IA32 2136 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698