Files
sdk/runtime/vm/compiler/frontend/bytecode_reader.h
T
Zach Anderson b4004f6476 [vm] Reland: Move the interpreter under a flag.
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>
2018-09-07 19:25:31 +00:00

49 lines
1.6 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.
#ifndef RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_READER_H_
#define RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_READER_H_
#include "vm/compiler/frontend/kernel_translation_helper.h"
#include "vm/object.h"
#if !defined(DART_PRECOMPILED_RUNTIME)
namespace dart {
namespace kernel {
// Helper class which provides access to bytecode metadata.
class BytecodeMetadataHelper : public MetadataHelper {
public:
static const char* tag() { return "vm.bytecode"; }
explicit BytecodeMetadataHelper(KernelReaderHelper* helper,
TypeTranslator* type_translator,
ActiveClass* active_class);
void ReadMetadata(const Function& function);
private:
// Returns the index of the last read pool entry.
intptr_t ReadPoolEntries(const Function& function,
const Function& inner_function,
const ObjectPool& pool,
intptr_t from_index);
RawCode* ReadBytecode(const ObjectPool& pool);
void ReadExceptionsTable(const Code& bytecode);
RawNativeEntryData* NativeEntry(const Function& function,
const String& external_name);
TypeTranslator& type_translator_;
ActiveClass* const active_class_;
DISALLOW_COPY_AND_ASSIGN(BytecodeMetadataHelper);
};
} // namespace kernel
} // namespace dart
#endif // !defined(DART_PRECOMPILED_RUNTIME)
#endif // RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_READER_H_