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 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 // gcc-4.4 has problem generating correct code of following snippet: | 2049 // gcc-4.4 has problem generating correct code of following snippet: |
2050 // { JSEntryStub stub; | 2050 // { JSEntryStub stub; |
2051 // js_entry_code_ = *stub.GetCode(); | 2051 // js_entry_code_ = *stub.GetCode(); |
2052 // } | 2052 // } |
2053 // { JSConstructEntryStub stub; | 2053 // { JSConstructEntryStub stub; |
2054 // js_construct_entry_code_ = *stub.GetCode(); | 2054 // js_construct_entry_code_ = *stub.GetCode(); |
2055 // } | 2055 // } |
2056 // To workaround the problem, make separate functions without inlining. | 2056 // To workaround the problem, make separate functions without inlining. |
2057 Heap::CreateJSEntryStub(); | 2057 Heap::CreateJSEntryStub(); |
2058 Heap::CreateJSConstructEntryStub(); | 2058 Heap::CreateJSConstructEntryStub(); |
| 2059 |
| 2060 // Create stubs that should be there, so we don't unexpectedly have to |
| 2061 // create them if we need them during the creation of another stub. |
| 2062 // Stub creation mixes raw pointers and handles in an unsafe manner so |
| 2063 // we cannot create stubs while we are creating stubs. |
| 2064 CEntryStub ces(1); |
| 2065 ces.GetCode(); |
| 2066 |
| 2067 CodeStub::GenerateStubsAheadOfTime(); |
2059 } | 2068 } |
2060 | 2069 |
2061 | 2070 |
2062 bool Heap::CreateInitialObjects() { | 2071 bool Heap::CreateInitialObjects() { |
2063 Object* obj; | 2072 Object* obj; |
2064 | 2073 |
2065 // The -0 value must be set before NumberFromDouble works. | 2074 // The -0 value must be set before NumberFromDouble works. |
2066 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); | 2075 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); |
2067 if (!maybe_obj->ToObject(&obj)) return false; | 2076 if (!maybe_obj->ToObject(&obj)) return false; |
2068 } | 2077 } |
(...skipping 4210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6279 } | 6288 } |
6280 | 6289 |
6281 | 6290 |
6282 void ExternalStringTable::TearDown() { | 6291 void ExternalStringTable::TearDown() { |
6283 new_space_strings_.Free(); | 6292 new_space_strings_.Free(); |
6284 old_space_strings_.Free(); | 6293 old_space_strings_.Free(); |
6285 } | 6294 } |
6286 | 6295 |
6287 | 6296 |
6288 } } // namespace v8::internal | 6297 } } // namespace v8::internal |
OLD | NEW |