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

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

Issue 2941643002: Check for a passed-in type argument vector in the prolog of generic functions. (Closed)
Patch Set: address review comments Created 3 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
« no previous file with comments | « runtime/vm/native_arguments.h ('k') | runtime/vm/object.h » ('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) 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 RUNTIME_VM_NATIVE_ENTRY_H_ 5 #ifndef RUNTIME_VM_NATIVE_ENTRY_H_
6 #define RUNTIME_VM_NATIVE_ENTRY_H_ 6 #define RUNTIME_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #define TRACE_NATIVE_CALL(format, name) \ 46 #define TRACE_NATIVE_CALL(format, name) \
47 do { \ 47 do { \
48 } while (0) 48 } while (0)
49 #endif 49 #endif
50 50
51 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name 51 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name
52 52
53 #ifdef DEBUG 53 #ifdef DEBUG
54 #define SET_NATIVE_RETVAL(args, value) \ 54 #define SET_NATIVE_RETVAL(args, value) \
55 RawObject* retval = value; \ 55 RawObject* retval = value; \
56 ASSERT(retval->IsDartInstance()); \ 56 ASSERT(retval->IsDartInstance() || retval->IsTypeArguments()); \
57 arguments->SetReturnUnsafe(retval); 57 arguments->SetReturnUnsafe(retval);
58 #else 58 #else
59 #define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value); 59 #define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value);
60 #endif 60 #endif
61 61
62 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ 62 #define DEFINE_NATIVE_ENTRY(name, argument_count) \
63 static RawObject* DN_Helper##name(Isolate* isolate, Thread* thread, \ 63 static RawObject* DN_Helper##name(Isolate* isolate, Thread* thread, \
64 Zone* zone, NativeArguments* arguments); \ 64 Zone* zone, NativeArguments* arguments); \
65 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ 65 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \
66 CHECK_STACK_ALIGNMENT; \ 66 CHECK_STACK_ALIGNMENT; \
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 static void AutoScopeNativeCallWrapperNoStackCheck(Dart_NativeArguments args, 150 static void AutoScopeNativeCallWrapperNoStackCheck(Dart_NativeArguments args,
151 Dart_NativeFunction func); 151 Dart_NativeFunction func);
152 152
153 static bool ReturnValueIsError(NativeArguments* arguments); 153 static bool ReturnValueIsError(NativeArguments* arguments);
154 static void PropagateErrors(NativeArguments* arguments); 154 static void PropagateErrors(NativeArguments* arguments);
155 }; 155 };
156 156
157 } // namespace dart 157 } // namespace dart
158 158
159 #endif // RUNTIME_VM_NATIVE_ENTRY_H_ 159 #endif // RUNTIME_VM_NATIVE_ENTRY_H_
OLDNEW
« no previous file with comments | « runtime/vm/native_arguments.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698