| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // The current thread may not yet had entered an isolate to run. | 57 // The current thread may not yet had entered an isolate to run. |
| 58 // Note the Isolate::Current() may be non-null because for various | 58 // Note the Isolate::Current() may be non-null because for various |
| 59 // initialization purposes an initializing thread may be assigned an isolate | 59 // initialization purposes an initializing thread may be assigned an isolate |
| 60 // but not actually enter it. | 60 // but not actually enter it. |
| 61 if (i::Isolate::CurrentPerIsolateThreadData() == NULL) { | 61 if (i::Isolate::CurrentPerIsolateThreadData() == NULL) { |
| 62 i::Isolate::EnterDefaultIsolate(); | 62 i::Isolate::EnterDefaultIsolate(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 ASSERT(i::Isolate::CurrentPerIsolateThreadData() != NULL); | 65 ASSERT(i::Isolate::CurrentPerIsolateThreadData() != NULL); |
| 66 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->thread_id() == | 66 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->thread_id().Equals( |
| 67 i::Thread::GetThreadLocalInt(i::Isolate::thread_id_key())); | 67 i::ThreadId::Current())); |
| 68 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->isolate() == | 68 ASSERT(i::Isolate::CurrentPerIsolateThreadData()->isolate() == |
| 69 i::Isolate::Current()); | 69 i::Isolate::Current()); |
| 70 | 70 |
| 71 if (IsDead()) return false; | 71 if (IsDead()) return false; |
| 72 | 72 |
| 73 Isolate* isolate = Isolate::Current(); | 73 Isolate* isolate = Isolate::Current(); |
| 74 if (isolate->IsInitialized()) return true; | 74 if (isolate->IsInitialized()) return true; |
| 75 | 75 |
| 76 is_running_ = true; | 76 is_running_ = true; |
| 77 has_been_setup_ = true; | 77 has_been_setup_ = true; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 CPU::Setup(); | 202 CPU::Setup(); |
| 203 if (!CPU::SupportsCrankshaft()) { | 203 if (!CPU::SupportsCrankshaft()) { |
| 204 use_crankshaft_ = false; | 204 use_crankshaft_ = false; |
| 205 } | 205 } |
| 206 | 206 |
| 207 // Peephole optimization might interfere with deoptimization. | 207 // Peephole optimization might interfere with deoptimization. |
| 208 FLAG_peephole_optimization = !use_crankshaft_; | 208 FLAG_peephole_optimization = !use_crankshaft_; |
| 209 } | 209 } |
| 210 | 210 |
| 211 } } // namespace v8::internal | 211 } } // namespace v8::internal |
| OLD | NEW |