b4004f6476
After this CL, the interpreter is included by default in the JIT VM under the flag --enable-interpreter. Reland with fix to NativeArgument setup in simulator_arm.cc Change-Id: Ib9b4df6eb4d997dfbe361188b8a127828c1d9c6f Reviewed-on: https://dart-review.googlesource.com/74003 Reviewed-by: Siva Annamalai <asiva@google.com> Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Zach Anderson <zra@google.com>
34 lines
1.4 KiB
C++
34 lines
1.4 KiB
C++
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/code_patcher.h"
|
|
|
|
#include "vm/instructions_kbc.h"
|
|
#include "vm/object.h"
|
|
|
|
namespace dart {
|
|
|
|
void KBCPatcher::PatchNativeCallAt(uword return_address,
|
|
const Code& bytecode,
|
|
NativeFunction function,
|
|
NativeFunctionWrapper trampoline) {
|
|
ASSERT(bytecode.ContainsInstructionAt(return_address));
|
|
const NativeEntryData& native_entry_data = NativeEntryData::Handle(
|
|
KBCNativeCallPattern::GetNativeEntryDataAt(return_address, bytecode));
|
|
native_entry_data.set_trampoline(trampoline);
|
|
native_entry_data.set_native_function(function);
|
|
}
|
|
|
|
NativeFunctionWrapper KBCPatcher::GetNativeCallAt(uword return_address,
|
|
const Code& bytecode,
|
|
NativeFunction* function) {
|
|
ASSERT(bytecode.ContainsInstructionAt(return_address));
|
|
const NativeEntryData& native_entry_data = NativeEntryData::Handle(
|
|
KBCNativeCallPattern::GetNativeEntryDataAt(return_address, bytecode));
|
|
*function = native_entry_data.native_function();
|
|
return native_entry_data.trampoline();
|
|
}
|
|
|
|
} // namespace dart
|