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

Side by Side Diff: src/heap.cc

Issue 147022: Workaround a gcc 4.4 bug.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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/heap.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 if (obj->IsFailure()) return false; 1250 if (obj->IsFailure()) return false;
1251 Object* elements = AllocateFixedArray(2); 1251 Object* elements = AllocateFixedArray(2);
1252 if (elements->IsFailure()) return false; 1252 if (elements->IsFailure()) return false;
1253 FixedArray::cast(elements)->set(0, Smi::FromInt(0)); 1253 FixedArray::cast(elements)->set(0, Smi::FromInt(0));
1254 JSObject::cast(obj)->set_elements(FixedArray::cast(elements)); 1254 JSObject::cast(obj)->set_elements(FixedArray::cast(elements));
1255 message_listeners_ = JSObject::cast(obj); 1255 message_listeners_ = JSObject::cast(obj);
1256 1256
1257 return true; 1257 return true;
1258 } 1258 }
1259 1259
1260
1261 void Heap::CreateCEntryStub() {
1262 CEntryStub stub;
1263 c_entry_code_ = *stub.GetCode();
1264 }
1265
1266
1267 void Heap::CreateCEntryDebugBreakStub() {
1268 CEntryDebugBreakStub stub;
1269 c_entry_debug_break_code_ = *stub.GetCode();
1270 }
1271
1272
1273 void Heap::CreateJSEntryStub() {
1274 JSEntryStub stub;
1275 js_entry_code_ = *stub.GetCode();
1276 }
1277
1278
1279 void Heap::CreateJSConstructEntryStub() {
1280 JSConstructEntryStub stub;
1281 js_construct_entry_code_ = *stub.GetCode();
1282 }
1283
1284
1260 void Heap::CreateFixedStubs() { 1285 void Heap::CreateFixedStubs() {
1261 // Here we create roots for fixed stubs. They are needed at GC 1286 // Here we create roots for fixed stubs. They are needed at GC
1262 // for cooking and uncooking (check out frames.cc). 1287 // for cooking and uncooking (check out frames.cc).
1263 // The eliminates the need for doing dictionary lookup in the 1288 // The eliminates the need for doing dictionary lookup in the
1264 // stub cache for these stubs. 1289 // stub cache for these stubs.
1265 HandleScope scope; 1290 HandleScope scope;
1266 { 1291 // gcc-4.4 has problem to generate the correct vtables if the following
Erik Corry 2009/06/24 07:38:31 Should be "gcc-4.4 has problems generating..." I
1267 CEntryStub stub; 1292 // functions are inlined. e.g.,
1268 c_entry_code_ = *stub.GetCode(); 1293 // { CEntryStub stub;
1269 } 1294 // c_entry_code_ = *stub.GetCode();
1270 { 1295 // }
1271 CEntryDebugBreakStub stub; 1296 // { CEntryDebugBreakStub stub;
1272 c_entry_debug_break_code_ = *stub.GetCode(); 1297 // c_entry_debug_break_code_ = *stub.GetCode();
1273 } 1298 // }
1274 { 1299 //
1275 JSEntryStub stub; 1300 // Possible gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32327
Erik Corry 2009/06/24 07:38:31 Is this relevant? According to the bug this was f
1276 js_entry_code_ = *stub.GetCode(); 1301 Heap::CreateCEntryStub();
1277 } 1302 Heap::CreateCEntryDebugBreakStub();
1278 { 1303 Heap::CreateJSEntryStub();
1279 JSConstructEntryStub stub; 1304 Heap::CreateJSConstructEntryStub();
1280 js_construct_entry_code_ = *stub.GetCode();
1281 }
1282 } 1305 }
1283 1306
1284 1307
1285 bool Heap::CreateInitialObjects() { 1308 bool Heap::CreateInitialObjects() {
1286 Object* obj; 1309 Object* obj;
1287 1310
1288 // The -0 value must be set before NumberFromDouble works. 1311 // The -0 value must be set before NumberFromDouble works.
1289 obj = AllocateHeapNumber(-0.0, TENURED); 1312 obj = AllocateHeapNumber(-0.0, TENURED);
1290 if (obj->IsFailure()) return false; 1313 if (obj->IsFailure()) return false;
1291 minus_zero_value_ = obj; 1314 minus_zero_value_ = obj;
(...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3580 #ifdef DEBUG 3603 #ifdef DEBUG
3581 bool Heap::GarbageCollectionGreedyCheck() { 3604 bool Heap::GarbageCollectionGreedyCheck() {
3582 ASSERT(FLAG_gc_greedy); 3605 ASSERT(FLAG_gc_greedy);
3583 if (Bootstrapper::IsActive()) return true; 3606 if (Bootstrapper::IsActive()) return true;
3584 if (disallow_allocation_failure()) return true; 3607 if (disallow_allocation_failure()) return true;
3585 return CollectGarbage(0, NEW_SPACE); 3608 return CollectGarbage(0, NEW_SPACE);
3586 } 3609 }
3587 #endif 3610 #endif
3588 3611
3589 } } // namespace v8::internal 3612 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698