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

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

Issue 17421003: Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call si… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
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"
11 #include "vm/symbols.h" 11 #include "vm/symbols.h"
12 #include "vm/unit_test.h" 12 #include "vm/unit_test.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 TEST_CASE(FindCodeObject) { 16 TEST_CASE(FindCodeObject) {
17 #if defined(TARGET_ARCH_IA32) 17 #if defined(TARGET_ARCH_IA32)
18 const int kLoopCount = 50000; 18 const int kLoopCount = 50000;
19 #elif defined(TARGET_ARCH_X64) 19 #else
20 const int kLoopCount = 25000; 20 const int kLoopCount = 25000;
21 #elif defined(TARGET_ARCH_MIPS)
22 // TODO(zra): Increase after we implement far branches on MIPS.
23 const int kLoopCount = 1818;
24 #else
25 const int kLoopCount = 20000;
26 #endif 21 #endif
27 const int kScriptSize = 512 * KB; 22 const int kScriptSize = 512 * KB;
28 const int kNumFunctions = 1024; 23 const int kNumFunctions = 1024;
29 char scriptChars[kScriptSize]; 24 char scriptChars[kScriptSize];
30 String& url = String::Handle(String::New("dart-test:FindCodeObject")); 25 String& url = String::Handle(String::New("dart-test:FindCodeObject"));
31 String& source = String::Handle(); 26 String& source = String::Handle();
32 Script& script = Script::Handle(); 27 Script& script = Script::Handle();
33 Library& lib = Library::Handle(); 28 Library& lib = Library::Handle();
34 Class& clsA = Class::Handle(); 29 Class& clsA = Class::Handle();
35 Class& clsB = Class::Handle(); 30 Class& clsB = Class::Handle();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 #else 151 #else
157 EXPECT(code.Size() > PageSpace::kPageSize); 152 EXPECT(code.Size() > PageSpace::kPageSize);
158 EXPECT(Code::LookupCode(pc) == code.raw()); 153 EXPECT(Code::LookupCode(pc) == code.raw());
159 EXPECT(code.Size() > (1 * MB)); 154 EXPECT(code.Size() > (1 * MB));
160 pc = code.EntryPoint() + (1 * MB); 155 pc = code.EntryPoint() + (1 * MB);
161 EXPECT(Code::LookupCode(pc) == code.raw()); 156 EXPECT(Code::LookupCode(pc) == code.raw());
162 #endif // defined(TARGET_ARCH_MIPS) 157 #endif // defined(TARGET_ARCH_MIPS)
163 } 158 }
164 159
165 } // namespace dart 160 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698