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

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

Issue 1296703002: Move test runtime entries out of the master list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/stub_code_arm_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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"
11 #include "vm/native_entry_test.h" 11 #include "vm/native_entry_test.h"
12 #include "vm/object.h" 12 #include "vm/object.h"
13 #include "vm/runtime_entry.h" 13 #include "vm/runtime_entry.h"
14 #include "vm/stub_code.h" 14 #include "vm/stub_code.h"
15 #include "vm/symbols.h" 15 #include "vm/symbols.h"
16 #include "vm/unit_test.h" 16 #include "vm/unit_test.h"
17 17
18 #define __ assembler-> 18 #define __ assembler->
19 19
20 namespace dart { 20 namespace dart {
21 21
22 DECLARE_RUNTIME_ENTRY(TestSmiSub)
23 DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*)
Florian Schneider 2015/08/17 07:48:03 I think native_entry_test.h would be a natural, pl
rmacnak 2015/08/17 18:04:21 Yes, better.
24
25
22 static Function* CreateFunction(const char* name) { 26 static Function* CreateFunction(const char* name) {
23 const String& class_name = String::Handle(Symbols::New("ownerClass")); 27 const String& class_name = String::Handle(Symbols::New("ownerClass"));
24 const Script& script = Script::Handle(); 28 const Script& script = Script::Handle();
25 const Class& owner_class = 29 const Class& owner_class =
26 Class::Handle(Class::New(class_name, script, Scanner::kNoSourcePos)); 30 Class::Handle(Class::New(class_name, script, Scanner::kNoSourcePos));
27 const Library& lib = Library::Handle(Library::New(class_name)); 31 const Library& lib = Library::Handle(Library::New(class_name));
28 owner_class.set_library(lib); 32 owner_class.set_library(lib);
29 const String& function_name = String::ZoneHandle(Symbols::New(name)); 33 const String& function_name = String::ZoneHandle(Symbols::New(name));
30 Function& function = Function::ZoneHandle( 34 Function& function = Function::ZoneHandle(
31 Function::New(function_name, RawFunction::kRegularFunction, 35 Function::New(function_name, RawFunction::kRegularFunction,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_)); 102 *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_));
99 const Function& function = RegisterFakeFunction(kName, code); 103 const Function& function = RegisterFakeFunction(kName, code);
100 Smi& result = Smi::Handle(); 104 Smi& result = Smi::Handle();
101 result ^= DartEntry::InvokeFunction(function, Object::empty_array()); 105 result ^= DartEntry::InvokeFunction(function, Object::empty_array());
102 EXPECT_EQ((value1 + value2), result.Value()); 106 EXPECT_EQ((value1 + value2), result.Value());
103 } 107 }
104 108
105 } // namespace dart 109 } // namespace dart
106 110
107 #endif // defined TARGET_ARCH_ARM64 111 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry_test.cc ('k') | runtime/vm/stub_code_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698