Sha256: 802e77a0c5b7f45ecc57c9490e768f0f37e3740c7c8f94ad3af0fb3e3f28594c

Contents?: true

Size: 1.51 KB

Versions: 9

Compression:

Stored size: 1.51 KB

Contents

// Copyright 2010 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_VM_STATE_H_
#define V8_VM_STATE_H_

#include "src/allocation.h"
#include "src/counters.h"
#include "src/isolate.h"

namespace v8 {
namespace internal {

// Logging and profiling.  A StateTag represents a possible state of
// the VM. The logger maintains a stack of these. Creating a VMState
// object enters a state by pushing on the stack, and destroying a
// VMState object leaves a state by popping the current state from the
// stack.
template <StateTag Tag>
class VMState BASE_EMBEDDED {
 public:
  explicit inline VMState(Isolate* isolate);
  inline ~VMState();

 private:
  Isolate* isolate_;
  StateTag previous_tag_;
};


class ExternalCallbackScope BASE_EMBEDDED {
 public:
  inline ExternalCallbackScope(Isolate* isolate, Address callback);
  inline ~ExternalCallbackScope();
  Address callback() { return callback_; }
  Address* callback_entrypoint_address() {
    if (callback_ == nullptr) return nullptr;
#if USES_FUNCTION_DESCRIPTORS
    return FUNCTION_ENTRYPOINT_ADDRESS(callback_);
#else
    return &callback_;
#endif
  }
  ExternalCallbackScope* previous() { return previous_scope_; }
  inline Address scope_address();

 private:
  Isolate* isolate_;
  Address callback_;
  ExternalCallbackScope* previous_scope_;
#ifdef USE_SIMULATOR
  Address scope_address_;
#endif
};

}  // namespace internal
}  // namespace v8


#endif  // V8_VM_STATE_H_

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
libv8-6.0.286.54.1 vendor/v8/src/vm-state.h
libv8-6.0.286.54.0 vendor/v8/src/vm-state.h
libv8-6.0.286.54.0beta2 vendor/v8/src/vm-state.h
libv8-6.0.286.54.0beta1 vendor/v8/src/vm-state.h
libv8-6.0.286.44.0beta1 vendor/v8/src/vm-state.h
node-compiler-0.9.1 vendor/node/deps/v8/src/vm-state.h
node-compiler-0.9.0 vendor/node-v7.2.1/deps/v8/src/vm-state.h
node-compiler-0.8.0 vendor/node-v7.2.0/deps/v8/src/vm-state.h
node-compiler-0.7.0 vendor/node-v7.1.0/deps/v8/src/vm-state.h