| OLD | NEW |
| 1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2010 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 name##_ = (initial_value); | 278 name##_ = (initial_value); |
| 279 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE) | 279 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE) |
| 280 #undef ISOLATE_INIT_EXECUTE | 280 #undef ISOLATE_INIT_EXECUTE |
| 281 | 281 |
| 282 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \ | 282 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \ |
| 283 memset(name##_, 0, sizeof(type) * length); | 283 memset(name##_, 0, sizeof(type) * length); |
| 284 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE) | 284 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE) |
| 285 #undef ISOLATE_INIT_ARRAY_EXECUTE | 285 #undef ISOLATE_INIT_ARRAY_EXECUTE |
| 286 } | 286 } |
| 287 | 287 |
| 288 | 288 void Isolate::TearDown() { |
| 289 void Isolate::TearDownAndRecreateGlobalIsolate() { | |
| 290 if (global_isolate_ != NULL) { | 289 if (global_isolate_ != NULL) { |
| 291 delete global_isolate_; | 290 delete global_isolate_; |
| 292 global_isolate_ = NULL; | 291 global_isolate_ = NULL; |
| 293 } | 292 } |
| 293 } |
| 294 |
| 295 void Isolate::TearDownAndRecreateGlobalIsolate() { |
| 296 TearDown(); |
| 294 | 297 |
| 295 global_isolate_ = new Isolate(); | 298 global_isolate_ = new Isolate(); |
| 296 global_isolate_->PreInit(); | 299 global_isolate_->PreInit(); |
| 297 } | 300 } |
| 298 | 301 |
| 299 | 302 |
| 300 Isolate::~Isolate() { | 303 Isolate::~Isolate() { |
| 301 if (state_ == INITIALIZED) { | 304 if (state_ == INITIALIZED) { |
| 302 OProfileAgent::TearDown(); | 305 OProfileAgent::TearDown(); |
| 303 if (FLAG_preemption) { | 306 if (FLAG_preemption) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 LOG(LogCodeObjects()); | 537 LOG(LogCodeObjects()); |
| 535 LOG(LogCompiledFunctions()); | 538 LOG(LogCompiledFunctions()); |
| 536 } | 539 } |
| 537 | 540 |
| 538 state_ = INITIALIZED; | 541 state_ = INITIALIZED; |
| 539 return true; | 542 return true; |
| 540 } | 543 } |
| 541 | 544 |
| 542 | 545 |
| 543 } } // namespace v8::internal | 546 } } // namespace v8::internal |
| OLD | NEW |