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

Unified Diff: runtime/vm/native_arguments.h

Issue 117723002: Allow the native resolver to setup whether it needs the Dart API scope to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_arguments.h
===================================================================
--- runtime/vm/native_arguments.h (revision 31283)
+++ runtime/vm/native_arguments.h (working copy)
@@ -131,6 +131,9 @@
static intptr_t retval_offset() {
return OFFSET_OF(NativeArguments, retval_);
}
+ static intptr_t AutoSetupScopeMask() {
+ return AutoSetupScopeBits::mask_in_place();
+ }
static int ParameterCountForResolution(const Function& function) {
ASSERT(function.is_native());
@@ -157,7 +160,11 @@
if (function.IsClosureFunction()) {
function_bits |= kClosureFunctionBit;
}
- return FunctionBits::update(function_bits, tag);
+ tag = FunctionBits::update(function_bits, tag);
+ if (function.IsNativeAutoSetupScope()) {
+ tag = AutoSetupScopeBits::update(1, tag);
+ }
+ return tag;
}
private:
@@ -170,9 +177,11 @@
kArgcSize = 24,
kFunctionBit = 24,
kFunctionSize = 2,
+ kAutoSetupScopeBit = 26,
};
class ArgcBits : public BitField<int, kArgcBit, kArgcSize> {};
class FunctionBits : public BitField<int, kFunctionBit, kFunctionSize> {};
+ class AutoSetupScopeBits : public BitField<int, kAutoSetupScopeBit, 1> {};
friend class Api;
friend class BootstrapNatives;
friend class Simulator;
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698