LCOV - code coverage report
Current view: top level - src/objects - frame-array-inl.h (source / functions) Hit Total Coverage
Test: app.info Lines: 7 7 100.0 %
Date: 2017-04-26 Functions: 4 4 100.0 %

          Line data    Source code
       1             : // Copyright 2017 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_OBJECTS_FRAME_ARRAY_INL_H_
       6             : #define V8_OBJECTS_FRAME_ARRAY_INL_H_
       7             : 
       8             : #include "src/objects/frame-array.h"
       9             : 
      10             : // Has to be the last include (doesn't have include guards):
      11             : #include "src/objects/object-macros.h"
      12             : 
      13             : namespace v8 {
      14             : namespace internal {
      15             : 
      16             : CAST_ACCESSOR(FrameArray)
      17             : 
      18             : #define DEFINE_FRAME_ARRAY_ACCESSORS(name, type)                              \
      19             :   type* FrameArray::name(int frame_ix) const {                                \
      20             :     Object* obj =                                                             \
      21             :         get(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset);    \
      22             :     return type::cast(obj);                                                   \
      23             :   }                                                                           \
      24             :                                                                               \
      25             :   void FrameArray::Set##name(int frame_ix, type* value) {                     \
      26             :     set(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset, value); \
      27             :   }
      28    25205044 : FRAME_ARRAY_FIELD_LIST(DEFINE_FRAME_ARRAY_ACCESSORS)
      29             : #undef DEFINE_FRAME_ARRAY_ACCESSORS
      30             : 
      31          44 : bool FrameArray::IsWasmFrame(int frame_ix) const {
      32             :   const int flags = Flags(frame_ix)->value();
      33          44 :   return (flags & kIsWasmFrame) != 0;
      34             : }
      35             : 
      36        3951 : bool FrameArray::IsWasmInterpretedFrame(int frame_ix) const {
      37             :   const int flags = Flags(frame_ix)->value();
      38        3951 :   return (flags & kIsWasmInterpretedFrame) != 0;
      39             : }
      40             : 
      41          44 : bool FrameArray::IsAsmJsWasmFrame(int frame_ix) const {
      42             :   const int flags = Flags(frame_ix)->value();
      43          44 :   return (flags & kIsAsmJsWasmFrame) != 0;
      44             : }
      45             : 
      46             : int FrameArray::FrameCount() const {
      47             :   const int frame_count = Smi::cast(get(kFrameCountIndex))->value();
      48             :   DCHECK_LE(0, frame_count);
      49             :   return frame_count;
      50             : }
      51             : 
      52             : }  // namespace internal
      53             : }  // namespace v8
      54             : 
      55             : #include "src/objects/object-macros-undef.h"
      56             : 
      57             : #endif  // V8_OBJECTS_FRAME_ARRAY_INL_H_

Generated by: LCOV version 1.10