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

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

Issue 82293002: - Update use of kPageSize in ifdef'd MIPS code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | 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 "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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 EXPECT(Code::LookupCode(pc) == code.raw()); 135 EXPECT(Code::LookupCode(pc) == code.raw());
136 136
137 // Lookup the large function 137 // Lookup the large function
138 OS::SNPrint(buffer, 256, "moo%d", 0); 138 OS::SNPrint(buffer, 256, "moo%d", 0);
139 function_name = String::New(buffer); 139 function_name = String::New(buffer);
140 function = clsB.LookupStaticFunction(function_name); 140 function = clsB.LookupStaticFunction(function_name);
141 EXPECT(!function.IsNull()); 141 EXPECT(!function.IsNull());
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)
Ivan Posva 2013/11/22 00:42:09 @zra: Is this ifdef still needed? The comment seem
zra 2013/11/22 21:36:33 It isn't needed. Removing in https://codereview.ch
146 // MIPS can only Branch +/- 128KB 146 // MIPS can only Branch +/- 128KB
147 EXPECT(code.Size() > (PageSpace::kPageSize / 2)); 147 EXPECT(code.Size() > ((PageSpace::kPageSizeInWords << kWordSizeLog2) / 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::kPageSizeInWords << kWordSizeLog2) / 4);
150 EXPECT(Code::LookupCode(pc) == code.raw()); 150 EXPECT(Code::LookupCode(pc) == code.raw());
151 #else 151 #else
152 EXPECT(code.Size() > (PageSpace::kPageSizeInWords << kWordSizeLog2)); 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698