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

Side by Side Diff: src/v8.cc

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
« no previous file with comments | « src/smart-pointers.h ('k') | src/v8globals.h » ('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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 has_fatal_error_ = true; 99 has_fatal_error_ = true;
100 } 100 }
101 101
102 102
103 void V8::TearDown() { 103 void V8::TearDown() {
104 Isolate* isolate = Isolate::Current(); 104 Isolate* isolate = Isolate::Current();
105 ASSERT(isolate->IsDefaultIsolate()); 105 ASSERT(isolate->IsDefaultIsolate());
106 106
107 if (!has_been_set_up_ || has_been_disposed_) return; 107 if (!has_been_set_up_ || has_been_disposed_) return;
108 108
109 // The isolate has to be torn down before clearing the LOperand
110 // caches so that the optimizing compiler thread (if running)
111 // doesn't see an inconsistent view of the lithium instructions.
112 isolate->TearDown();
113 delete isolate;
114
109 ElementsAccessor::TearDown(); 115 ElementsAccessor::TearDown();
110 LOperand::TearDownCaches(); 116 LOperand::TearDownCaches();
111 RegisteredExtension::UnregisterAll(); 117 RegisteredExtension::UnregisterAll();
112 118
113 isolate->TearDown();
114 delete isolate;
115
116 is_running_ = false; 119 is_running_ = false;
117 has_been_disposed_ = true; 120 has_been_disposed_ = true;
118 121
119 delete call_completed_callbacks_; 122 delete call_completed_callbacks_;
120 call_completed_callbacks_ = NULL; 123 call_completed_callbacks_ = NULL;
121 124
122 OS::TearDown(); 125 OS::TearDown();
123 } 126 }
124 127
125 128
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 SetUpJSCallerSavedCodeData(); 282 SetUpJSCallerSavedCodeData();
280 SamplerRegistry::SetUp(); 283 SamplerRegistry::SetUp();
281 ExternalReference::SetUp(); 284 ExternalReference::SetUp();
282 } 285 }
283 286
284 void V8::InitializeOncePerProcess() { 287 void V8::InitializeOncePerProcess() {
285 CallOnce(&init_once, &InitializeOncePerProcessImpl); 288 CallOnce(&init_once, &InitializeOncePerProcessImpl);
286 } 289 }
287 290
288 } } // namespace v8::internal 291 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/smart-pointers.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698