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

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

Issue 1316673005: Track which entries in the ObjectPool are native entries, and reset them when loading a precompiled… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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_NATIVE_ENTRY_H_ 5 #ifndef VM_NATIVE_ENTRY_H_
6 #define VM_NATIVE_ENTRY_H_ 6 #define VM_NATIVE_ENTRY_H_
7 7
8 #include "platform/memory_sanitizer.h" 8 #include "platform/memory_sanitizer.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 __args__.SetAt(0, __##name##_instance__); \ 95 __args__.SetAt(0, __##name##_instance__); \
96 Exceptions::ThrowByType(Exceptions::kArgument, __args__); \ 96 Exceptions::ThrowByType(Exceptions::kArgument, __args__); \
97 } \ 97 } \
98 } \ 98 } \
99 name ^= value; 99 name ^= value;
100 100
101 101
102 // Helper class for resolving and handling native functions. 102 // Helper class for resolving and handling native functions.
103 class NativeEntry : public AllStatic { 103 class NativeEntry : public AllStatic {
104 public: 104 public:
105 static const intptr_t kNumArguments = 1;
105 static const intptr_t kNumCallWrapperArguments = 2; 106 static const intptr_t kNumCallWrapperArguments = 2;
106 107
107 // Resolve specified dart native function to the actual native entrypoint. 108 // Resolve specified dart native function to the actual native entrypoint.
108 static NativeFunction ResolveNative(const Library& library, 109 static NativeFunction ResolveNative(const Library& library,
109 const String& function_name, 110 const String& function_name,
110 int number_of_arguments, 111 int number_of_arguments,
111 bool* auto_setup_scope); 112 bool* auto_setup_scope);
112 static const uint8_t* ResolveSymbolInLibrary(const Library& library, 113 static const uint8_t* ResolveSymbolInLibrary(const Library& library,
113 uword pc); 114 uword pc);
114 static const uint8_t* ResolveSymbol(uword pc); 115 static const uint8_t* ResolveSymbol(uword pc);
115 116
116 static const ExternalLabel& NativeCallWrapperLabel(); 117 static const ExternalLabel& NativeCallWrapperLabel();
117 static void NativeCallWrapper(Dart_NativeArguments args, 118 static void NativeCallWrapper(Dart_NativeArguments args,
118 Dart_NativeFunction func); 119 Dart_NativeFunction func);
119 120
120 static const ExternalLabel& LinkNativeCallLabel(); 121 static const ExternalLabel& LinkNativeCallLabel();
121 static void LinkNativeCall(Dart_NativeArguments args); 122 static void LinkNativeCall(Dart_NativeArguments args);
122 }; 123 };
123 124
124 } // namespace dart 125 } // namespace dart
125 126
126 #endif // VM_NATIVE_ENTRY_H_ 127 #endif // VM_NATIVE_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698