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

Side by Side Diff: runtime/vm/runtime_entry.h

Issue 8818001: Add 64-bit stubs to call into the runtime and to call native functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_RUNTIME_ENTRY_H_ 5 #ifndef VM_RUNTIME_ENTRY_H_
6 #define VM_RUNTIME_ENTRY_H_ 6 #define VM_RUNTIME_ENTRY_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 15 matching lines...) Expand all
26 : name_(name), 26 : name_(name),
27 function_(function), 27 function_(function),
28 argument_count_(argument_count) { } 28 argument_count_(argument_count) { }
29 ~RuntimeEntry() {} 29 ~RuntimeEntry() {}
30 30
31 const char* name() const { return name_; } 31 const char* name() const { return name_; }
32 RuntimeFunction function() const { return function_; } 32 RuntimeFunction function() const { return function_; }
33 int argument_count() const { return argument_count_; } 33 int argument_count() const { return argument_count_; }
34 uword GetEntryPoint() const { return reinterpret_cast<uword>(function()); } 34 uword GetEntryPoint() const { return reinterpret_cast<uword>(function()); }
35 35
36 // Add function to a class and that class to the class dictionary so that
37 // frame walking can be used (for testing purposes only).
38 static const Function& RegisterFakeFunction(const char* name,
Ivan Posva 2011/12/07 08:34:51 Please do not put testing code into non-test sourc
regis 2011/12/07 19:37:36 Made the function global in runtime_entry_test.cc.
39 const Code& code);
40
36 // Generate code to call the runtime entry. 41 // Generate code to call the runtime entry.
37 void CallFromDart(Assembler* assembler) const; 42 void CallFromDart(Assembler* assembler) const;
38 void CallFromStub(Assembler* assembler) const; 43 void CallFromStub(Assembler* assembler) const;
39 44
40 private: 45 private:
41 const char* name_; 46 const char* name_;
42 RuntimeFunction function_; 47 RuntimeFunction function_;
43 int argument_count_; 48 int argument_count_;
44 49
45 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry); 50 DISALLOW_COPY_AND_ASSIGN(RuntimeEntry);
(...skipping 19 matching lines...) Expand all
65 VERIFY_ON_TRANSITION; \ 70 VERIFY_ON_TRANSITION; \
66 } \ 71 } \
67 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments) 72 static void DRT_Helper##name(Isolate* isolate, NativeArguments arguments)
68 73
69 #define DECLARE_RUNTIME_ENTRY(name) \ 74 #define DECLARE_RUNTIME_ENTRY(name) \
70 extern const RuntimeEntry k##name##RuntimeEntry 75 extern const RuntimeEntry k##name##RuntimeEntry
71 76
72 } // namespace dart 77 } // namespace dart
73 78
74 #endif // VM_RUNTIME_ENTRY_H_ 79 #endif // VM_RUNTIME_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698