Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "vm/native_entry.h" | 5 #include "vm/native_entry.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper); | 92 uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper); |
| 93 #if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC) | 93 #if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC) |
| 94 // DBC does not use redirections unlike other simulators. | 94 // DBC does not use redirections unlike other simulators. |
| 95 entry = Simulator::RedirectExternalReference( | 95 entry = Simulator::RedirectExternalReference( |
| 96 entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments); | 96 entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments); |
| 97 #endif | 97 #endif |
| 98 return entry; | 98 return entry; |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 NO_SANITIZE_MEMORY | |
|
Florian Schneider
2016/10/04 21:02:02
Here, it would be nice to figure out why the unpoi
siva
2016/10/05 20:38:07
Figured out what the problem was, we need to unpoi
| |
| 102 bool NativeEntry::ReturnValueIsError(NativeArguments* arguments) { | 103 bool NativeEntry::ReturnValueIsError(NativeArguments* arguments) { |
| 103 RawObject* retval = arguments->ReturnValue(); | 104 RawObject* retval = arguments->ReturnValue(); |
| 104 return (retval->IsHeapObject() && | 105 return (retval->IsHeapObject() && |
| 105 RawObject::IsErrorClassId(retval->GetClassId())); | 106 RawObject::IsErrorClassId(retval->GetClassId())); |
| 106 } | 107 } |
| 107 | 108 |
| 108 | 109 |
| 109 void NativeEntry::PropagateErrors(NativeArguments* arguments) { | 110 void NativeEntry::PropagateErrors(NativeArguments* arguments) { |
| 110 Thread* thread = arguments->thread(); | 111 Thread* thread = arguments->thread(); |
| 111 thread->UnwindScopes(thread->top_exit_frame_info()); | 112 thread->UnwindScopes(thread->top_exit_frame_info()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 NativeEntry::NativeCallWrapperNoStackCheck( | 297 NativeEntry::NativeCallWrapperNoStackCheck( |
| 297 args, reinterpret_cast<Dart_NativeFunction>(target_function)); | 298 args, reinterpret_cast<Dart_NativeFunction>(target_function)); |
| 298 } else { | 299 } else { |
| 299 target_function(arguments); | 300 target_function(arguments); |
| 300 } | 301 } |
| 301 } | 302 } |
| 302 #endif // !defined(TARGET_ARCH_DBC) | 303 #endif // !defined(TARGET_ARCH_DBC) |
| 303 | 304 |
| 304 | 305 |
| 305 } // namespace dart | 306 } // namespace dart |
| OLD | NEW |