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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 bool V8::has_been_setup_ = false; | 50 bool V8::has_been_setup_ = false; |
51 bool V8::has_been_disposed_ = false; | 51 bool V8::has_been_disposed_ = false; |
52 bool V8::has_fatal_error_ = false; | 52 bool V8::has_fatal_error_ = false; |
53 bool V8::use_crankshaft_ = true; | 53 bool V8::use_crankshaft_ = true; |
54 | 54 |
55 static Mutex* entropy_mutex = OS::CreateMutex(); | 55 static Mutex* entropy_mutex = OS::CreateMutex(); |
56 static EntropySource entropy_source; | 56 static EntropySource entropy_source; |
57 | 57 |
58 | 58 |
59 bool V8::Initialize(Deserializer* des) { | 59 bool V8::Initialize(Deserializer* des) { |
60 // Setting --harmony implies all other harmony flags. | |
61 // TODO(rossberg): Is there a better place to put this? | |
Steven
2011/10/12 11:54:38
This is indeed not such a cool place to put it. Yo
rossberg
2011/10/12 12:06:56
Well, I think flags.cc would be the wrong place to
| |
62 if (FLAG_harmony) { | |
63 FLAG_harmony_typeof = true; | |
64 FLAG_harmony_scoping = true; | |
65 FLAG_harmony_proxies = true; | |
66 FLAG_harmony_weakmaps = true; | |
67 } | |
68 | |
60 InitializeOncePerProcess(); | 69 InitializeOncePerProcess(); |
61 | 70 |
62 // The current thread may not yet had entered an isolate to run. | 71 // The current thread may not yet had entered an isolate to run. |
63 // Note the Isolate::Current() may be non-null because for various | 72 // Note the Isolate::Current() may be non-null because for various |
64 // initialization purposes an initializing thread may be assigned an isolate | 73 // initialization purposes an initializing thread may be assigned an isolate |
65 // but not actually enter it. | 74 // but not actually enter it. |
66 if (i::Isolate::CurrentPerIsolateThreadData() == NULL) { | 75 if (i::Isolate::CurrentPerIsolateThreadData() == NULL) { |
67 i::Isolate::EnterDefaultIsolate(); | 76 i::Isolate::EnterDefaultIsolate(); |
68 } | 77 } |
69 | 78 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 | 221 |
213 RuntimeProfiler::GlobalSetup(); | 222 RuntimeProfiler::GlobalSetup(); |
214 | 223 |
215 // Peephole optimization might interfere with deoptimization. | 224 // Peephole optimization might interfere with deoptimization. |
216 FLAG_peephole_optimization = !use_crankshaft_; | 225 FLAG_peephole_optimization = !use_crankshaft_; |
217 | 226 |
218 ElementsAccessor::InitializeOncePerProcess(); | 227 ElementsAccessor::InitializeOncePerProcess(); |
219 } | 228 } |
220 | 229 |
221 } } // namespace v8::internal | 230 } } // namespace v8::internal |
OLD | NEW |