| Index: runtime/vm/native_entry.cc
|
| diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
|
| index f89c9a050fa644f458d693554e1f66214d6f85e7..a6f8ec27ccf6b319f00a0e7911a58d83e149b822 100644
|
| --- a/runtime/vm/native_entry.cc
|
| +++ b/runtime/vm/native_entry.cc
|
| @@ -18,7 +18,6 @@
|
| #include "vm/symbols.h"
|
| #include "vm/tags.h"
|
|
|
| -
|
| namespace dart {
|
|
|
| DEFINE_FLAG(bool,
|
| @@ -26,14 +25,12 @@ DEFINE_FLAG(bool,
|
| false,
|
| "Trace invocation of natives (debug mode only)");
|
|
|
| -
|
| void DartNativeThrowArgumentException(const Instance& instance) {
|
| const Array& __args__ = Array::Handle(Array::New(1));
|
| __args__.SetAt(0, instance);
|
| Exceptions::ThrowByType(Exceptions::kArgument, __args__);
|
| }
|
|
|
| -
|
| NativeFunction NativeEntry::ResolveNative(const Library& library,
|
| const String& function_name,
|
| int number_of_arguments,
|
| @@ -57,7 +54,6 @@ NativeFunction NativeEntry::ResolveNative(const Library& library,
|
| return reinterpret_cast<NativeFunction>(native_function);
|
| }
|
|
|
| -
|
| const uint8_t* NativeEntry::ResolveSymbolInLibrary(const Library& library,
|
| uword pc) {
|
| Dart_NativeEntrySymbol symbol_resolver =
|
| @@ -69,7 +65,6 @@ const uint8_t* NativeEntry::ResolveSymbolInLibrary(const Library& library,
|
| return symbol_resolver(reinterpret_cast<Dart_NativeFunction>(pc));
|
| }
|
|
|
| -
|
| const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
|
| Thread* thread = Thread::Current();
|
| REUSABLE_GROWABLE_OBJECT_ARRAY_HANDLESCOPE(thread);
|
| @@ -90,14 +85,12 @@ const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
|
| return NULL;
|
| }
|
|
|
| -
|
| bool NativeEntry::ReturnValueIsError(NativeArguments* arguments) {
|
| RawObject* retval = arguments->ReturnValue();
|
| return (retval->IsHeapObject() &&
|
| RawObject::IsErrorClassId(retval->GetClassId()));
|
| }
|
|
|
| -
|
| void NativeEntry::PropagateErrors(NativeArguments* arguments) {
|
| Thread* thread = arguments->thread();
|
| thread->UnwindScopes(thread->top_exit_frame_info());
|
| @@ -109,7 +102,6 @@ void NativeEntry::PropagateErrors(NativeArguments* arguments) {
|
| UNREACHABLE();
|
| }
|
|
|
| -
|
| uword NativeEntry::NoScopeNativeCallWrapperEntry() {
|
| uword entry = reinterpret_cast<uword>(NativeEntry::NoScopeNativeCallWrapper);
|
| #if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
|
| @@ -120,14 +112,12 @@ uword NativeEntry::NoScopeNativeCallWrapperEntry() {
|
| return entry;
|
| }
|
|
|
| -
|
| void NativeEntry::NoScopeNativeCallWrapper(Dart_NativeArguments args,
|
| Dart_NativeFunction func) {
|
| CHECK_STACK_ALIGNMENT;
|
| NoScopeNativeCallWrapperNoStackCheck(args, func);
|
| }
|
|
|
| -
|
| void NativeEntry::NoScopeNativeCallWrapperNoStackCheck(
|
| Dart_NativeArguments args,
|
| Dart_NativeFunction func) {
|
| @@ -148,7 +138,6 @@ void NativeEntry::NoScopeNativeCallWrapperNoStackCheck(
|
| VERIFY_ON_TRANSITION;
|
| }
|
|
|
| -
|
| uword NativeEntry::AutoScopeNativeCallWrapperEntry() {
|
| uword entry =
|
| reinterpret_cast<uword>(NativeEntry::AutoScopeNativeCallWrapper);
|
| @@ -160,14 +149,12 @@ uword NativeEntry::AutoScopeNativeCallWrapperEntry() {
|
| return entry;
|
| }
|
|
|
| -
|
| void NativeEntry::AutoScopeNativeCallWrapper(Dart_NativeArguments args,
|
| Dart_NativeFunction func) {
|
| CHECK_STACK_ALIGNMENT;
|
| AutoScopeNativeCallWrapperNoStackCheck(args, func);
|
| }
|
|
|
| -
|
| void NativeEntry::AutoScopeNativeCallWrapperNoStackCheck(
|
| Dart_NativeArguments args,
|
| Dart_NativeFunction func) {
|
| @@ -215,7 +202,6 @@ void NativeEntry::AutoScopeNativeCallWrapperNoStackCheck(
|
| VERIFY_ON_TRANSITION;
|
| }
|
|
|
| -
|
| // DBC does not support lazy native call linking.
|
| #if !defined(TARGET_ARCH_DBC)
|
| static NativeFunction ResolveNativeFunction(Zone* zone,
|
| @@ -236,7 +222,6 @@ static NativeFunction ResolveNativeFunction(Zone* zone,
|
| is_auto_scope);
|
| }
|
|
|
| -
|
| uword NativeEntry::LinkNativeCallEntry() {
|
| uword entry = reinterpret_cast<uword>(NativeEntry::LinkNativeCall);
|
| #if defined(USING_SIMULATOR)
|
| @@ -246,7 +231,6 @@ uword NativeEntry::LinkNativeCallEntry() {
|
| return entry;
|
| }
|
|
|
| -
|
| void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
|
| CHECK_STACK_ALIGNMENT;
|
| VERIFY_ON_TRANSITION;
|
| @@ -344,5 +328,4 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
|
| }
|
| #endif // !defined(TARGET_ARCH_DBC)
|
|
|
| -
|
| } // namespace dart
|
|
|