LCOV - code coverage report
Current view: top level - src - code-reference.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 1 27 3.7 %
Date: 2019-01-20 Functions: 2 10 20.0 %

          Line data    Source code
       1             : // Copyright 2018 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             : #include "src/code-reference.h"
       6             : 
       7             : #include "src/handles-inl.h"
       8             : #include "src/objects-inl.h"
       9             : #include "src/wasm/wasm-code-manager.h"
      10             : 
      11             : namespace v8 {
      12             : namespace internal {
      13             : 
      14           0 : Address CodeReference::constant_pool() const {
      15           0 :   return kind_ == JS ? js_code_->constant_pool() : wasm_code_->constant_pool();
      16             : }
      17             : 
      18           0 : Address CodeReference::instruction_start() const {
      19           0 :   return kind_ == JS
      20           0 :              ? js_code_->InstructionStart()
      21           0 :              : reinterpret_cast<Address>(wasm_code_->instructions().start());
      22             : }
      23             : 
      24           0 : Address CodeReference::instruction_end() const {
      25           0 :   return kind_ == JS
      26           0 :              ? js_code_->InstructionEnd()
      27           0 :              : reinterpret_cast<Address>(wasm_code_->instructions().start() +
      28           0 :                                          wasm_code_->instructions().size());
      29             : }
      30             : 
      31           0 : int CodeReference::instruction_size() const {
      32           0 :   return kind_ == JS ? js_code_->InstructionSize()
      33           0 :                      : wasm_code_->instructions().length();
      34             : }
      35             : 
      36           0 : const byte* CodeReference::relocation_start() const {
      37           0 :   return kind_ == JS ? js_code_->relocation_start()
      38           0 :                      : wasm_code_->reloc_info().start();
      39             : }
      40             : 
      41           0 : const byte* CodeReference::relocation_end() const {
      42           0 :   return kind_ == JS ? js_code_->relocation_end()
      43           0 :                      : wasm_code_->reloc_info().start() +
      44           0 :                            wasm_code_->reloc_info().length();
      45             : }
      46             : 
      47           0 : int CodeReference::relocation_size() const {
      48           0 :   return kind_ == JS ? js_code_->relocation_size()
      49           0 :                      : wasm_code_->reloc_info().length();
      50             : }
      51             : 
      52           0 : Address CodeReference::code_comments() const {
      53           0 :   return kind_ == JS ? js_code_->code_comments() : wasm_code_->code_comments();
      54             : }
      55             : 
      56             : }  // namespace internal
      57      183867 : }  // namespace v8

Generated by: LCOV version 1.10