LCOV - code coverage report
Current view: top level - test/unittests/interpreter - interpreter-assembler-unittest.h (source / functions) Hit Total Coverage
Test: app.info Lines: 4 4 100.0 %
Date: 2019-04-18 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2015 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #ifndef V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_
       6             : #define V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_
       7             : 
       8             : #include "src/compiler/code-assembler.h"
       9             : #include "src/compiler/machine-operator.h"
      10             : #include "src/interpreter/interpreter-assembler.h"
      11             : #include "test/unittests/test-utils.h"
      12             : #include "testing/gmock-support.h"
      13             : 
      14             : namespace v8 {
      15             : namespace internal {
      16             : namespace interpreter {
      17             : namespace interpreter_assembler_unittest {
      18             : 
      19             : using ::testing::Matcher;
      20             : 
      21             : class InterpreterAssemblerTest;
      22             : 
      23        1446 : class InterpreterAssemblerTestState : public compiler::CodeAssemblerState {
      24             :  public:
      25             :   InterpreterAssemblerTestState(InterpreterAssemblerTest* test,
      26             :                                 Bytecode bytecode);
      27             : };
      28             : 
      29             : class InterpreterAssemblerTest : public TestWithIsolateAndZone {
      30             :  public:
      31           8 :   InterpreterAssemblerTest() = default;
      32          16 :   ~InterpreterAssemblerTest() override = default;
      33             : 
      34             :   class InterpreterAssemblerForTest final : public InterpreterAssembler {
      35             :    public:
      36             :     InterpreterAssemblerForTest(
      37             :         InterpreterAssemblerTestState* state, Bytecode bytecode,
      38             :         OperandScale operand_scale = OperandScale::kSingle)
      39        1446 :         : InterpreterAssembler(state, bytecode, operand_scale) {}
      40             :     ~InterpreterAssemblerForTest();
      41             : 
      42             :     Matcher<compiler::Node*> IsLoad(
      43             :         const Matcher<compiler::LoadRepresentation>& rep_matcher,
      44             :         const Matcher<compiler::Node*>& base_matcher,
      45             :         const Matcher<compiler::Node*>& index_matcher,
      46             :         LoadSensitivity needs_poisoning = LoadSensitivity::kSafe);
      47             :     Matcher<compiler::Node*> IsStore(
      48             :         const Matcher<compiler::StoreRepresentation>& rep_matcher,
      49             :         const Matcher<compiler::Node*>& base_matcher,
      50             :         const Matcher<compiler::Node*>& index_matcher,
      51             :         const Matcher<compiler::Node*>& value_matcher);
      52             : 
      53             :     Matcher<Node*> IsWordNot(const Matcher<Node*>& value_matcher);
      54             : 
      55             :     Matcher<compiler::Node*> IsUnsignedByteOperand(
      56             :         int offset, LoadSensitivity needs_poisoning);
      57             :     Matcher<compiler::Node*> IsSignedByteOperand(
      58             :         int offset, LoadSensitivity needs_poisoning);
      59             :     Matcher<compiler::Node*> IsUnsignedShortOperand(
      60             :         int offset, LoadSensitivity needs_poisoning);
      61             :     Matcher<compiler::Node*> IsSignedShortOperand(
      62             :         int offset, LoadSensitivity needs_poisoning);
      63             :     Matcher<compiler::Node*> IsUnsignedQuadOperand(
      64             :         int offset, LoadSensitivity needs_poisoning);
      65             :     Matcher<compiler::Node*> IsSignedQuadOperand(
      66             :         int offset, LoadSensitivity needs_poisoning);
      67             : 
      68             :     Matcher<compiler::Node*> IsUnpoisonedSignedOperand(
      69             :         int offset, OperandSize operand_size, LoadSensitivity needs_poisoning);
      70             :     Matcher<compiler::Node*> IsUnpoisonedUnsignedOperand(
      71             :         int offset, OperandSize operand_size, LoadSensitivity needs_poisoning);
      72             : 
      73             :     Matcher<compiler::Node*> IsSignedOperand(int offset,
      74             :                                              OperandSize operand_size,
      75             :                                              LoadSensitivity needs_poisoning);
      76             :     Matcher<compiler::Node*> IsUnsignedOperand(int offset,
      77             :                                                OperandSize operand_size,
      78             :                                                LoadSensitivity needs_poisoning);
      79             : 
      80             :     Matcher<compiler::Node*> IsLoadRegisterOperand(int offset,
      81             :                                                    OperandSize operand_size);
      82             : 
      83             :    private:
      84             :     DISALLOW_COPY_AND_ASSIGN(InterpreterAssemblerForTest);
      85             :   };
      86             : };
      87             : 
      88             : }  // namespace interpreter_assembler_unittest
      89             : }  // namespace interpreter
      90             : }  // namespace internal
      91             : }  // namespace v8
      92             : 
      93             : #endif  // V8_UNITTESTS_INTERPRETER_INTERPRETER_ASSEMBLER_UNITTEST_H_

Generated by: LCOV version 1.10