| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 23 matching lines...) Expand all Loading... |
| 34 #include "atomicops.h" | 34 #include "atomicops.h" |
| 35 #include "builtins.h" | 35 #include "builtins.h" |
| 36 #include "contexts.h" | 36 #include "contexts.h" |
| 37 #include "execution.h" | 37 #include "execution.h" |
| 38 #include "frames.h" | 38 #include "frames.h" |
| 39 #include "date.h" | 39 #include "date.h" |
| 40 #include "global-handles.h" | 40 #include "global-handles.h" |
| 41 #include "handles.h" | 41 #include "handles.h" |
| 42 #include "hashmap.h" | 42 #include "hashmap.h" |
| 43 #include "heap.h" | 43 #include "heap.h" |
| 44 #include "optimizing-compiler-thread.h" |
| 44 #include "regexp-stack.h" | 45 #include "regexp-stack.h" |
| 45 #include "runtime-profiler.h" | 46 #include "runtime-profiler.h" |
| 46 #include "runtime.h" | 47 #include "runtime.h" |
| 47 #include "zone.h" | 48 #include "zone.h" |
| 48 | 49 |
| 49 namespace v8 { | 50 namespace v8 { |
| 50 namespace internal { | 51 namespace internal { |
| 51 | 52 |
| 52 class Bootstrapper; | 53 class Bootstrapper; |
| 53 class CodeGenerator; | 54 class CodeGenerator; |
| 54 class CodeRange; | 55 class CodeRange; |
| 55 class CompilationCache; | 56 class CompilationCache; |
| 56 class ContextSlotCache; | 57 class ContextSlotCache; |
| 57 class ContextSwitcher; | 58 class ContextSwitcher; |
| 58 class Counters; | 59 class Counters; |
| 59 class CpuFeatures; | 60 class CpuFeatures; |
| 60 class CpuProfiler; | 61 class CpuProfiler; |
| 61 class DeoptimizerData; | 62 class DeoptimizerData; |
| 62 class Deserializer; | 63 class Deserializer; |
| 63 class EmptyStatement; | 64 class EmptyStatement; |
| 64 class ExternalReferenceTable; | 65 class ExternalReferenceTable; |
| 65 class Factory; | 66 class Factory; |
| 66 class FunctionInfoListener; | 67 class FunctionInfoListener; |
| 67 class HandleScopeImplementer; | 68 class HandleScopeImplementer; |
| 68 class HeapProfiler; | 69 class HeapProfiler; |
| 69 class InlineRuntimeFunctionsTable; | 70 class InlineRuntimeFunctionsTable; |
| 70 class NoAllocationStringAllocator; | 71 class NoAllocationStringAllocator; |
| 71 class InnerPointerToCodeCache; | 72 class InnerPointerToCodeCache; |
| 73 class OptimizingCompilerThread; |
| 72 class PreallocatedMemoryThread; | 74 class PreallocatedMemoryThread; |
| 73 class RegExpStack; | 75 class RegExpStack; |
| 74 class SaveContext; | 76 class SaveContext; |
| 75 class UnicodeCache; | 77 class UnicodeCache; |
| 76 class StringInputBuffer; | 78 class StringInputBuffer; |
| 77 class StringTracker; | 79 class StringTracker; |
| 78 class StubCache; | 80 class StubCache; |
| 79 class ThreadManager; | 81 class ThreadManager; |
| 80 class ThreadState; | 82 class ThreadState; |
| 81 class ThreadVisitor; // Defined in v8threads.h | 83 class ThreadVisitor; // Defined in v8threads.h |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 return date_cache_; | 1027 return date_cache_; |
| 1026 } | 1028 } |
| 1027 | 1029 |
| 1028 void set_date_cache(DateCache* date_cache) { | 1030 void set_date_cache(DateCache* date_cache) { |
| 1029 if (date_cache != date_cache_) { | 1031 if (date_cache != date_cache_) { |
| 1030 delete date_cache_; | 1032 delete date_cache_; |
| 1031 } | 1033 } |
| 1032 date_cache_ = date_cache; | 1034 date_cache_ = date_cache; |
| 1033 } | 1035 } |
| 1034 | 1036 |
| 1037 void queue_for_optimization(Handle<JSFunction> function); |
| 1038 |
| 1035 private: | 1039 private: |
| 1036 Isolate(); | 1040 Isolate(); |
| 1037 | 1041 |
| 1038 friend struct GlobalState; | 1042 friend struct GlobalState; |
| 1039 friend struct InitializeGlobalState; | 1043 friend struct InitializeGlobalState; |
| 1040 | 1044 |
| 1041 enum State { | 1045 enum State { |
| 1042 UNINITIALIZED, // Some components may not have been allocated. | 1046 UNINITIALIZED, // Some components may not have been allocated. |
| 1043 INITIALIZED // All components are fully initialized. | 1047 INITIALIZED // All components are fully initialized. |
| 1044 }; | 1048 }; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; | 1204 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; |
| 1201 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1205 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
| 1202 StringInputBuffer objects_string_compare_buffer_a_; | 1206 StringInputBuffer objects_string_compare_buffer_a_; |
| 1203 StringInputBuffer objects_string_compare_buffer_b_; | 1207 StringInputBuffer objects_string_compare_buffer_b_; |
| 1204 StaticResource<StringInputBuffer> objects_string_input_buffer_; | 1208 StaticResource<StringInputBuffer> objects_string_input_buffer_; |
| 1205 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1209 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1206 regexp_macro_assembler_canonicalize_; | 1210 regexp_macro_assembler_canonicalize_; |
| 1207 RegExpStack* regexp_stack_; | 1211 RegExpStack* regexp_stack_; |
| 1208 DateCache* date_cache_; | 1212 DateCache* date_cache_; |
| 1209 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1213 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1214 OptimizingCompilerThread* optimizing_compiler_thread_; |
| 1210 | 1215 |
| 1211 // The garbage collector should be a little more aggressive when it knows | 1216 // The garbage collector should be a little more aggressive when it knows |
| 1212 // that a context was recently exited. | 1217 // that a context was recently exited. |
| 1213 bool context_exit_happened_; | 1218 bool context_exit_happened_; |
| 1214 | 1219 |
| 1215 // Time stamp at initialization. | 1220 // Time stamp at initialization. |
| 1216 double time_millis_at_init_; | 1221 double time_millis_at_init_; |
| 1217 | 1222 |
| 1218 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ | 1223 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| 1219 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) | 1224 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1250 // between compilation units. | 1255 // between compilation units. |
| 1251 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1256 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1252 static const intptr_t name##_debug_offset_; | 1257 static const intptr_t name##_debug_offset_; |
| 1253 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1258 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1254 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1259 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1255 #undef ISOLATE_FIELD_OFFSET | 1260 #undef ISOLATE_FIELD_OFFSET |
| 1256 #endif | 1261 #endif |
| 1257 | 1262 |
| 1258 friend class ExecutionAccess; | 1263 friend class ExecutionAccess; |
| 1259 friend class IsolateInitializer; | 1264 friend class IsolateInitializer; |
| 1265 friend class OptimizingCompilerThread; |
| 1260 friend class ThreadManager; | 1266 friend class ThreadManager; |
| 1261 friend class Simulator; | 1267 friend class Simulator; |
| 1262 friend class StackGuard; | 1268 friend class StackGuard; |
| 1263 friend class ThreadId; | 1269 friend class ThreadId; |
| 1264 friend class TestMemoryAllocatorScope; | 1270 friend class TestMemoryAllocatorScope; |
| 1265 friend class v8::Isolate; | 1271 friend class v8::Isolate; |
| 1266 friend class v8::Locker; | 1272 friend class v8::Locker; |
| 1267 friend class v8::Unlocker; | 1273 friend class v8::Unlocker; |
| 1268 | 1274 |
| 1269 DISALLOW_COPY_AND_ASSIGN(Isolate); | 1275 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 | 1412 |
| 1407 // Mark the global context with out of memory. | 1413 // Mark the global context with out of memory. |
| 1408 inline void Context::mark_out_of_memory() { | 1414 inline void Context::mark_out_of_memory() { |
| 1409 global_context()->set_out_of_memory(HEAP->true_value()); | 1415 global_context()->set_out_of_memory(HEAP->true_value()); |
| 1410 } | 1416 } |
| 1411 | 1417 |
| 1412 | 1418 |
| 1413 } } // namespace v8::internal | 1419 } } // namespace v8::internal |
| 1414 | 1420 |
| 1415 #endif // V8_ISOLATE_H_ | 1421 #endif // V8_ISOLATE_H_ |
| OLD | NEW |