OLD | NEW |
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 Loading... |
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 |
OLD | NEW |