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.
5 #ifndef V8_ISOLATE_INL_H_
6 #define V8_ISOLATE_INL_H_
10 #include "utils/random-number-generator.h"
16 SaveContext::SaveContext(Isolate* isolate)
18 prev_(isolate->save_context()) {
19 if (isolate->context() != NULL) {
20 context_ = Handle<Context>(isolate->context());
22 isolate->set_save_context(this);
24 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top());
28 bool Isolate::IsCodePreAgingActive() {
29 return FLAG_optimize_for_size && FLAG_age_code && !IsDebuggerActive();
33 bool Isolate::IsDebuggerActive() {
34 return debugger()->IsDebuggerActive();
38 bool Isolate::DebuggerHasBreakPoints() {
39 return debug()->has_break_points();
43 RandomNumberGenerator* Isolate::random_number_generator() {
44 if (random_number_generator_ == NULL) {
45 random_number_generator_ = new RandomNumberGenerator;
47 return random_number_generator_;
50 } } // namespace v8::internal
52 #endif // V8_ISOLATE_INL_H_