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

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

Issue 25909002: Sampling profiler (Closed) Base URL: https://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 | « runtime/vm/stub_code_ia32_test.cc ('k') | runtime/vm/stub_code_x64_test.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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
(...skipping 10 matching lines...) Expand all
21 21
22 DECLARE_RUNTIME_ENTRY(TestSmiSub); 22 DECLARE_RUNTIME_ENTRY(TestSmiSub);
23 DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*); 23 DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
24 24
25 25
26 static Function* CreateFunction(const char* name) { 26 static Function* CreateFunction(const char* name) {
27 const String& class_name = String::Handle(Symbols::New("ownerClass")); 27 const String& class_name = String::Handle(Symbols::New("ownerClass"));
28 const Script& script = Script::Handle(); 28 const Script& script = Script::Handle();
29 const Class& owner_class = 29 const Class& owner_class =
30 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex)); 30 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
31 const Library& lib = Library::Handle(Library::New(class_name));
32 owner_class.set_library(lib);
31 const String& function_name = String::ZoneHandle(Symbols::New(name)); 33 const String& function_name = String::ZoneHandle(Symbols::New(name));
32 Function& function = Function::ZoneHandle( 34 Function& function = Function::ZoneHandle(
33 Function::New(function_name, RawFunction::kRegularFunction, 35 Function::New(function_name, RawFunction::kRegularFunction,
34 true, false, false, false, owner_class, 0)); 36 true, false, false, false, owner_class, 0));
35 return &function; 37 return &function;
36 } 38 }
37 39
38 40
39 // Test calls to stub code which calls into the runtime. 41 // Test calls to stub code which calls into the runtime.
40 static void GenerateCallToCallRuntimeStub(Assembler* assembler, 42 static void GenerateCallToCallRuntimeStub(Assembler* assembler,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_)); 104 *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_));
103 const Function& function = RegisterFakeFunction(kName, code); 105 const Function& function = RegisterFakeFunction(kName, code);
104 Smi& result = Smi::Handle(); 106 Smi& result = Smi::Handle();
105 result ^= DartEntry::InvokeFunction(function, Object::empty_array()); 107 result ^= DartEntry::InvokeFunction(function, Object::empty_array());
106 EXPECT_EQ((value1 + value2), result.Value()); 108 EXPECT_EQ((value1 + value2), result.Value());
107 } 109 }
108 110
109 } // namespace dart 111 } // namespace dart
110 112
111 #endif // defined TARGET_ARCH_MIPS 113 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32_test.cc ('k') | runtime/vm/stub_code_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698