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

Side by Side Diff: src/isolate.h

Issue 24568003: Allocate optimizing compiler thread only when necessary. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 1092
1093 void IterateDeferredHandles(ObjectVisitor* visitor); 1093 void IterateDeferredHandles(ObjectVisitor* visitor);
1094 void LinkDeferredHandles(DeferredHandles* deferred_handles); 1094 void LinkDeferredHandles(DeferredHandles* deferred_handles);
1095 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); 1095 void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
1096 1096
1097 #ifdef DEBUG 1097 #ifdef DEBUG
1098 bool IsDeferredHandle(Object** location); 1098 bool IsDeferredHandle(Object** location);
1099 #endif // DEBUG 1099 #endif // DEBUG
1100 1100
1101 OptimizingCompilerThread* optimizing_compiler_thread() { 1101 OptimizingCompilerThread* optimizing_compiler_thread() {
1102 return &optimizing_compiler_thread_; 1102 return optimizing_compiler_thread_;
1103 } 1103 }
1104 1104
1105 // PreInits and returns a default isolate. Needed when a new thread tries 1105 // PreInits and returns a default isolate. Needed when a new thread tries
1106 // to create a Locker for the first time (the lock itself is in the isolate). 1106 // to create a Locker for the first time (the lock itself is in the isolate).
1107 // TODO(svenpanne) This method is on death row... 1107 // TODO(svenpanne) This method is on death row...
1108 static v8::Isolate* GetDefaultIsolateForLocking(); 1108 static v8::Isolate* GetDefaultIsolateForLocking();
1109 1109
1110 MarkingThread** marking_threads() { 1110 MarkingThread** marking_threads() {
1111 return marking_thread_; 1111 return marking_thread_;
1112 } 1112 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 // preprocessor defines. Make sure the offsets of these fields agree 1362 // preprocessor defines. Make sure the offsets of these fields agree
1363 // between compilation units. 1363 // between compilation units.
1364 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1364 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1365 static const intptr_t name##_debug_offset_; 1365 static const intptr_t name##_debug_offset_;
1366 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1366 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1367 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1367 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1368 #undef ISOLATE_FIELD_OFFSET 1368 #undef ISOLATE_FIELD_OFFSET
1369 #endif 1369 #endif
1370 1370
1371 DeferredHandles* deferred_handles_head_; 1371 DeferredHandles* deferred_handles_head_;
1372 OptimizingCompilerThread optimizing_compiler_thread_; 1372 OptimizingCompilerThread* optimizing_compiler_thread_;
1373 MarkingThread** marking_thread_; 1373 MarkingThread** marking_thread_;
1374 SweeperThread** sweeper_thread_; 1374 SweeperThread** sweeper_thread_;
1375 1375
1376 // Counts deopt points if deopt_every_n_times is enabled. 1376 // Counts deopt points if deopt_every_n_times is enabled.
1377 unsigned int stress_deopt_count_; 1377 unsigned int stress_deopt_count_;
1378 1378
1379 friend class ExecutionAccess; 1379 friend class ExecutionAccess;
1380 friend class HandleScopeImplementer; 1380 friend class HandleScopeImplementer;
1381 friend class IsolateInitializer; 1381 friend class IsolateInitializer;
1382 friend class MarkingThread; 1382 friend class MarkingThread;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 1532
1533 // Mark the native context with out of memory. 1533 // Mark the native context with out of memory.
1534 inline void Context::mark_out_of_memory() { 1534 inline void Context::mark_out_of_memory() {
1535 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); 1535 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value());
1536 } 1536 }
1537 1537
1538 1538
1539 } } // namespace v8::internal 1539 } } // namespace v8::internal
1540 1540
1541 #endif // V8_ISOLATE_H_ 1541 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698