OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "codegen-inl.h" | 33 #include "codegen-inl.h" |
34 #include "compilation-cache.h" | 34 #include "compilation-cache.h" |
35 #include "debug.h" | 35 #include "debug.h" |
36 #include "global-handles.h" | 36 #include "global-handles.h" |
37 #include "mark-compact.h" | 37 #include "mark-compact.h" |
38 #include "natives.h" | 38 #include "natives.h" |
39 #include "scanner.h" | 39 #include "scanner.h" |
40 #include "scopeinfo.h" | 40 #include "scopeinfo.h" |
41 #include "v8threads.h" | 41 #include "v8threads.h" |
| 42 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 43 #include "regexp-macro-assembler.h" |
| 44 #endif |
42 | 45 |
43 namespace v8 { | 46 namespace v8 { |
44 namespace internal { | 47 namespace internal { |
45 | 48 |
46 | 49 |
47 String* Heap::hidden_symbol_; | 50 String* Heap::hidden_symbol_; |
48 Object* Heap::roots_[Heap::kRootListLength]; | 51 Object* Heap::roots_[Heap::kRootListLength]; |
49 | 52 |
50 | 53 |
51 NewSpace Heap::new_space_; | 54 NewSpace Heap::new_space_; |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 return true; | 1316 return true; |
1314 } | 1317 } |
1315 | 1318 |
1316 | 1319 |
1317 void Heap::CreateCEntryStub() { | 1320 void Heap::CreateCEntryStub() { |
1318 CEntryStub stub; | 1321 CEntryStub stub; |
1319 set_c_entry_code(*stub.GetCode()); | 1322 set_c_entry_code(*stub.GetCode()); |
1320 } | 1323 } |
1321 | 1324 |
1322 | 1325 |
| 1326 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 1327 void Heap::CreateRegExpCEntryStub() { |
| 1328 RegExpCEntryStub stub; |
| 1329 set_re_c_entry_code(*stub.GetCode()); |
| 1330 } |
| 1331 #endif |
| 1332 |
| 1333 |
1323 void Heap::CreateCEntryDebugBreakStub() { | 1334 void Heap::CreateCEntryDebugBreakStub() { |
1324 CEntryDebugBreakStub stub; | 1335 CEntryDebugBreakStub stub; |
1325 set_c_entry_debug_break_code(*stub.GetCode()); | 1336 set_c_entry_debug_break_code(*stub.GetCode()); |
1326 } | 1337 } |
1327 | 1338 |
1328 | 1339 |
1329 void Heap::CreateJSEntryStub() { | 1340 void Heap::CreateJSEntryStub() { |
1330 JSEntryStub stub; | 1341 JSEntryStub stub; |
1331 set_js_entry_code(*stub.GetCode()); | 1342 set_js_entry_code(*stub.GetCode()); |
1332 } | 1343 } |
(...skipping 16 matching lines...) Expand all Loading... |
1349 // c_entry_code_ = *stub.GetCode(); | 1360 // c_entry_code_ = *stub.GetCode(); |
1350 // } | 1361 // } |
1351 // { CEntryDebugBreakStub stub; | 1362 // { CEntryDebugBreakStub stub; |
1352 // c_entry_debug_break_code_ = *stub.GetCode(); | 1363 // c_entry_debug_break_code_ = *stub.GetCode(); |
1353 // } | 1364 // } |
1354 // To workaround the problem, make separate functions without inlining. | 1365 // To workaround the problem, make separate functions without inlining. |
1355 Heap::CreateCEntryStub(); | 1366 Heap::CreateCEntryStub(); |
1356 Heap::CreateCEntryDebugBreakStub(); | 1367 Heap::CreateCEntryDebugBreakStub(); |
1357 Heap::CreateJSEntryStub(); | 1368 Heap::CreateJSEntryStub(); |
1358 Heap::CreateJSConstructEntryStub(); | 1369 Heap::CreateJSConstructEntryStub(); |
| 1370 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 1371 Heap::CreateRegExpCEntryStub(); |
| 1372 #endif |
1359 } | 1373 } |
1360 | 1374 |
1361 | 1375 |
1362 bool Heap::CreateInitialObjects() { | 1376 bool Heap::CreateInitialObjects() { |
1363 Object* obj; | 1377 Object* obj; |
1364 | 1378 |
1365 // The -0 value must be set before NumberFromDouble works. | 1379 // The -0 value must be set before NumberFromDouble works. |
1366 obj = AllocateHeapNumber(-0.0, TENURED); | 1380 obj = AllocateHeapNumber(-0.0, TENURED); |
1367 if (obj->IsFailure()) return false; | 1381 if (obj->IsFailure()) return false; |
1368 set_minus_zero_value(obj); | 1382 set_minus_zero_value(obj); |
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3968 #ifdef DEBUG | 3982 #ifdef DEBUG |
3969 bool Heap::GarbageCollectionGreedyCheck() { | 3983 bool Heap::GarbageCollectionGreedyCheck() { |
3970 ASSERT(FLAG_gc_greedy); | 3984 ASSERT(FLAG_gc_greedy); |
3971 if (Bootstrapper::IsActive()) return true; | 3985 if (Bootstrapper::IsActive()) return true; |
3972 if (disallow_allocation_failure()) return true; | 3986 if (disallow_allocation_failure()) return true; |
3973 return CollectGarbage(0, NEW_SPACE); | 3987 return CollectGarbage(0, NEW_SPACE); |
3974 } | 3988 } |
3975 #endif | 3989 #endif |
3976 | 3990 |
3977 } } // namespace v8::internal | 3991 } } // namespace v8::internal |
OLD | NEW |