Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: src/isolate.h

Issue 10807024: Optimize functions on a second thread. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
56 class CompilerProxy;
Yang 2012/07/19 14:26:31 Left over? I can't find any CompilerProxy class.
sanjoy 2012/07/19 15:06:09 Yeah, fixed.
55 class CompilationCache; 57 class CompilationCache;
56 class ContextSlotCache; 58 class ContextSlotCache;
57 class ContextSwitcher; 59 class ContextSwitcher;
58 class Counters; 60 class Counters;
59 class CpuFeatures; 61 class CpuFeatures;
60 class CpuProfiler; 62 class CpuProfiler;
61 class DeoptimizerData; 63 class DeoptimizerData;
62 class Deserializer; 64 class Deserializer;
63 class EmptyStatement; 65 class EmptyStatement;
64 class ExternalReferenceTable; 66 class ExternalReferenceTable;
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // Out of resource exception helpers. 756 // Out of resource exception helpers.
755 Failure* StackOverflow(); 757 Failure* StackOverflow();
756 Failure* TerminateExecution(); 758 Failure* TerminateExecution();
757 759
758 // Administration 760 // Administration
759 void Iterate(ObjectVisitor* v); 761 void Iterate(ObjectVisitor* v);
760 void Iterate(ObjectVisitor* v, ThreadLocalTop* t); 762 void Iterate(ObjectVisitor* v, ThreadLocalTop* t);
761 char* Iterate(ObjectVisitor* v, char* t); 763 char* Iterate(ObjectVisitor* v, char* t);
762 void IterateThread(ThreadVisitor* v); 764 void IterateThread(ThreadVisitor* v);
763 void IterateThread(ThreadVisitor* v, char* t); 765 void IterateThread(ThreadVisitor* v, char* t);
764 766
Yang 2012/07/19 12:47:30 Stray edit?
sanjoy 2012/07/19 15:06:09 Done.
765
766 // Returns the current global context. 767 // Returns the current global context.
767 Handle<Context> global_context(); 768 Handle<Context> global_context();
768 769
769 // Returns the global context of the calling JavaScript code. That 770 // Returns the global context of the calling JavaScript code. That
770 // is, the global context of the top-most JavaScript frame. 771 // is, the global context of the top-most JavaScript frame.
771 Handle<Context> GetCallingGlobalContext(); 772 Handle<Context> GetCallingGlobalContext();
772 773
773 void RegisterTryCatchHandler(v8::TryCatch* that); 774 void RegisterTryCatchHandler(v8::TryCatch* that);
774 void UnregisterTryCatchHandler(v8::TryCatch* that); 775 void UnregisterTryCatchHandler(v8::TryCatch* that);
775 776
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 if (date_cache != date_cache_) { 1053 if (date_cache != date_cache_) {
1053 delete date_cache_; 1054 delete date_cache_;
1054 } 1055 }
1055 date_cache_ = date_cache; 1056 date_cache_ = date_cache;
1056 } 1057 }
1057 1058
1058 void IterateDeferredHandles(ObjectVisitor* visitor); 1059 void IterateDeferredHandles(ObjectVisitor* visitor);
1059 void LinkDeferredHandles(DeferredHandles* deferred_handles); 1060 void LinkDeferredHandles(DeferredHandles* deferred_handles);
1060 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); 1061 void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
1061 1062
1063 OptimizingCompilerThread* optimizing_compiler_thread() {
1064 return &optimizing_compiler_thread_;
1065 }
1066
1062 private: 1067 private:
1063 Isolate(); 1068 Isolate();
1064 1069
1065 friend struct GlobalState; 1070 friend struct GlobalState;
1066 friend struct InitializeGlobalState; 1071 friend struct InitializeGlobalState;
1067 1072
1068 enum State { 1073 enum State {
1069 UNINITIALIZED, // Some components may not have been allocated. 1074 UNINITIALIZED, // Some components may not have been allocated.
1070 INITIALIZED // All components are fully initialized. 1075 INITIALIZED // All components are fully initialized.
1071 }; 1076 };
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 // preprocessor defines. Make sure the offsets of these fields agree 1281 // preprocessor defines. Make sure the offsets of these fields agree
1277 // between compilation units. 1282 // between compilation units.
1278 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1283 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1279 static const intptr_t name##_debug_offset_; 1284 static const intptr_t name##_debug_offset_;
1280 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1285 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1281 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1286 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1282 #undef ISOLATE_FIELD_OFFSET 1287 #undef ISOLATE_FIELD_OFFSET
1283 #endif 1288 #endif
1284 1289
1285 DeferredHandles* deferred_handles_head_; 1290 DeferredHandles* deferred_handles_head_;
1291 OptimizingCompilerThread optimizing_compiler_thread_;
1292
1293 public:
1294 CompilerProxy* compiler_proxy_;
Yang 2012/07/19 14:26:31 ditto.
sanjoy 2012/07/19 15:06:09 Done.
1286 1295
1287 friend class ExecutionAccess; 1296 friend class ExecutionAccess;
1297 friend class HandleScopeImplementer;
1288 friend class IsolateInitializer; 1298 friend class IsolateInitializer;
1299 friend class OptimizingCompilerThread;
1289 friend class ThreadManager; 1300 friend class ThreadManager;
1290 friend class Simulator; 1301 friend class Simulator;
1291 friend class StackGuard; 1302 friend class StackGuard;
1292 friend class ThreadId; 1303 friend class ThreadId;
1293 friend class TestMemoryAllocatorScope; 1304 friend class TestMemoryAllocatorScope;
1294 friend class v8::Isolate; 1305 friend class v8::Isolate;
1295 friend class v8::Locker; 1306 friend class v8::Locker;
1296 friend class v8::Unlocker; 1307 friend class v8::Unlocker;
1297 1308
1298 DISALLOW_COPY_AND_ASSIGN(Isolate); 1309 DISALLOW_COPY_AND_ASSIGN(Isolate);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 1445
1435 // Mark the global context with out of memory. 1446 // Mark the global context with out of memory.
1436 inline void Context::mark_out_of_memory() { 1447 inline void Context::mark_out_of_memory() {
1437 global_context()->set_out_of_memory(HEAP->true_value()); 1448 global_context()->set_out_of_memory(HEAP->true_value());
1438 } 1449 }
1439 1450
1440 1451
1441 } } // namespace v8::internal 1452 } } // namespace v8::internal
1442 1453
1443 #endif // V8_ISOLATE_H_ 1454 #endif // V8_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698