v8/src/isolate-inl.h
jochen@chromium.org a4506cd3f2 Move platform abstraction to base library
Also split v8-core independent methods from checks.h to base/logging.h and
merge v8checks with the rest of checks.

The CPU::FlushICache method is moved to CpuFeatures::FlushICache

RoundUp and related methods are moved to base/macros.h

Remove all layering violations from src/libplatform

BUG=none
R=jkummerow@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/358363002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 13:25:46 +00:00

48 lines
1.1 KiB
C++

// Copyright 2011 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_ISOLATE_INL_H_
#define V8_ISOLATE_INL_H_
#include "src/base/utils/random-number-generator.h"
#include "src/debug.h"
#include "src/isolate.h"
namespace v8 {
namespace internal {
SaveContext::SaveContext(Isolate* isolate)
: isolate_(isolate),
prev_(isolate->save_context()) {
if (isolate->context() != NULL) {
context_ = Handle<Context>(isolate->context());
}
isolate->set_save_context(this);
c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
}
bool Isolate::DebuggerHasBreakPoints() {
return debug()->has_break_points();
}
base::RandomNumberGenerator* Isolate::random_number_generator() {
if (random_number_generator_ == NULL) {
if (FLAG_random_seed != 0) {
random_number_generator_ =
new base::RandomNumberGenerator(FLAG_random_seed);
} else {
random_number_generator_ = new base::RandomNumberGenerator();
}
}
return random_number_generator_;
}
} } // namespace v8::internal
#endif // V8_ISOLATE_INL_H_