OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 30 matching lines...) Expand all Loading... |
41 prev_(isolate->save_context()) { | 41 prev_(isolate->save_context()) { |
42 if (isolate->context() != NULL) { | 42 if (isolate->context() != NULL) { |
43 context_ = Handle<Context>(isolate->context()); | 43 context_ = Handle<Context>(isolate->context()); |
44 } | 44 } |
45 isolate->set_save_context(this); | 45 isolate->set_save_context(this); |
46 | 46 |
47 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top()); | 47 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top()); |
48 } | 48 } |
49 | 49 |
50 | 50 |
| 51 bool Isolate::IsCodePreAgingActive() { |
| 52 return FLAG_optimize_for_size && FLAG_age_code && !IsDebuggerActive(); |
| 53 } |
| 54 |
| 55 |
51 bool Isolate::IsDebuggerActive() { | 56 bool Isolate::IsDebuggerActive() { |
52 #ifdef ENABLE_DEBUGGER_SUPPORT | 57 #ifdef ENABLE_DEBUGGER_SUPPORT |
53 if (!NoBarrier_Load(&debugger_initialized_)) return false; | 58 if (!NoBarrier_Load(&debugger_initialized_)) return false; |
54 return debugger()->IsDebuggerActive(); | 59 return debugger()->IsDebuggerActive(); |
55 #else | 60 #else |
56 return false; | 61 return false; |
57 #endif | 62 #endif |
58 } | 63 } |
59 | 64 |
60 | 65 |
61 bool Isolate::DebuggerHasBreakPoints() { | 66 bool Isolate::DebuggerHasBreakPoints() { |
62 #ifdef ENABLE_DEBUGGER_SUPPORT | 67 #ifdef ENABLE_DEBUGGER_SUPPORT |
63 return debug()->has_break_points(); | 68 return debug()->has_break_points(); |
64 #else | 69 #else |
65 return false; | 70 return false; |
66 #endif | 71 #endif |
67 } | 72 } |
68 | 73 |
69 | 74 |
70 RandomNumberGenerator* Isolate::random_number_generator() { | 75 RandomNumberGenerator* Isolate::random_number_generator() { |
71 if (random_number_generator_ == NULL) { | 76 if (random_number_generator_ == NULL) { |
72 random_number_generator_ = new RandomNumberGenerator; | 77 random_number_generator_ = new RandomNumberGenerator; |
73 } | 78 } |
74 return random_number_generator_; | 79 return random_number_generator_; |
75 } | 80 } |
76 | 81 |
77 } } // namespace v8::internal | 82 } } // namespace v8::internal |
78 | 83 |
79 #endif // V8_ISOLATE_INL_H_ | 84 #endif // V8_ISOLATE_INL_H_ |
OLD | NEW |