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

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

Issue 70993002: - Convert heap sizes to words from bytes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | runtime/vm/pages.h » ('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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/pages.h" 9 #include "vm/pages.h"
10 #include "vm/stack_frame.h" 10 #include "vm/stack_frame.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 code = function.CurrentCode(); 142 code = function.CurrentCode();
143 EXPECT(code.Size() > 16); 143 EXPECT(code.Size() > 16);
144 pc = code.EntryPoint() + 16; 144 pc = code.EntryPoint() + 16;
145 #if defined(TARGET_ARCH_MIPS) 145 #if defined(TARGET_ARCH_MIPS)
146 // MIPS can only Branch +/- 128KB 146 // MIPS can only Branch +/- 128KB
147 EXPECT(code.Size() > (PageSpace::kPageSize / 2)); 147 EXPECT(code.Size() > (PageSpace::kPageSize / 2));
148 EXPECT(Code::LookupCode(pc) == code.raw()); 148 EXPECT(Code::LookupCode(pc) == code.raw());
149 pc = code.EntryPoint() + (PageSpace::kPageSize / 4); 149 pc = code.EntryPoint() + (PageSpace::kPageSize / 4);
150 EXPECT(Code::LookupCode(pc) == code.raw()); 150 EXPECT(Code::LookupCode(pc) == code.raw());
151 #else 151 #else
152 EXPECT(code.Size() > PageSpace::kPageSize); 152 EXPECT(code.Size() > (PageSpace::kPageSizeInWords << kWordSizeLog2));
153 EXPECT(Code::LookupCode(pc) == code.raw()); 153 EXPECT(Code::LookupCode(pc) == code.raw());
154 EXPECT(code.Size() > (1 * MB)); 154 EXPECT(code.Size() > (1 * MB));
155 pc = code.EntryPoint() + (1 * MB); 155 pc = code.EntryPoint() + (1 * MB);
156 EXPECT(Code::LookupCode(pc) == code.raw()); 156 EXPECT(Code::LookupCode(pc) == code.raw());
157 #endif // defined(TARGET_ARCH_MIPS) 157 #endif // defined(TARGET_ARCH_MIPS)
158 } 158 }
159 159
160 } // namespace dart 160 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698