LCOV - code coverage report
Current view: top level - src/ast - variables.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 10 10 100.0 %
Date: 2019-03-21 Functions: 3 3 100.0 %

          Line data    Source code
       1             : // Copyright 2011 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/ast/variables.h"
       6             : 
       7             : #include "src/ast/scopes.h"
       8             : #include "src/globals.h"
       9             : #include "src/objects-inl.h"
      10             : 
      11             : namespace v8 {
      12             : namespace internal {
      13             : 
      14             : // ----------------------------------------------------------------------------
      15             : // Implementation Variable.
      16             : 
      17      852957 : Variable::Variable(Variable* other)
      18      852957 :     : scope_(other->scope_),
      19      852957 :       name_(other->name_),
      20             :       local_if_not_shadowed_(nullptr),
      21             :       next_(nullptr),
      22      852957 :       index_(other->index_),
      23      852957 :       initializer_position_(other->initializer_position_),
      24     3411828 :       bit_field_(other->bit_field_) {}
      25             : 
      26    19398957 : bool Variable::IsGlobalObjectProperty() const {
      27             :   // Temporaries are never global, they must always be allocated in the
      28             :   // activation frame.
      29    33145012 :   return (IsDynamicVariableMode(mode()) || mode() == VariableMode::kVar) &&
      30    47640769 :          scope_ != nullptr && scope_->is_script_scope();
      31             : }
      32             : 
      33             : }  // namespace internal
      34      120216 : }  // namespace v8

Generated by: LCOV version 1.10