Chromium Code Reviews| 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 26 matching lines...) Expand all Loading... | |
| 37 #include "global-handles.h" | 37 #include "global-handles.h" |
| 38 #include "mark-compact.h" | 38 #include "mark-compact.h" |
| 39 #include "natives.h" | 39 #include "natives.h" |
| 40 #include "scanner.h" | 40 #include "scanner.h" |
| 41 #include "scopeinfo.h" | 41 #include "scopeinfo.h" |
| 42 #include "snapshot.h" | 42 #include "snapshot.h" |
| 43 #include "v8threads.h" | 43 #include "v8threads.h" |
| 44 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP | 44 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 45 #include "regexp-macro-assembler.h" | 45 #include "regexp-macro-assembler.h" |
| 46 #include "arm/regexp-macro-assembler-arm.h" | 46 #include "arm/regexp-macro-assembler-arm.h" |
| 47 #elif V8_TARGET_ARCH_MIPS && V8_NATIVE_REGEXP | |
|
Søren Thygesen Gjesse
2010/01/19 22:59:12
I think you can safely ignore native RegExp for MI
Alexandre
2010/01/22 23:08:42
Removed.
On 2010/01/19 22:59:12, Søren Gjesse wrot
| |
| 48 #include "regexp-macro-assembler.h" | |
| 49 #include "mips/regexp-macro-assembler-mips.h" | |
| 47 #endif | 50 #endif |
| 48 | 51 |
| 49 namespace v8 { | 52 namespace v8 { |
| 50 namespace internal { | 53 namespace internal { |
| 51 | 54 |
| 52 | 55 |
| 53 String* Heap::hidden_symbol_; | 56 String* Heap::hidden_symbol_; |
| 54 Object* Heap::roots_[Heap::kRootListLength]; | 57 Object* Heap::roots_[Heap::kRootListLength]; |
| 55 | 58 |
| 56 | 59 |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1325 // New space can't cope with forced allocation. | 1328 // New space can't cope with forced allocation. |
| 1326 if (always_allocate()) space = OLD_DATA_SPACE; | 1329 if (always_allocate()) space = OLD_DATA_SPACE; |
| 1327 | 1330 |
| 1328 Object* result = AllocateRaw(HeapNumber::kSize, space, OLD_DATA_SPACE); | 1331 Object* result = AllocateRaw(HeapNumber::kSize, space, OLD_DATA_SPACE); |
| 1329 if (result->IsFailure()) return result; | 1332 if (result->IsFailure()) return result; |
| 1330 | 1333 |
| 1331 HeapObject::cast(result)->set_map(heap_number_map()); | 1334 HeapObject::cast(result)->set_map(heap_number_map()); |
| 1332 HeapNumber::cast(result)->set_value(value); | 1335 HeapNumber::cast(result)->set_value(value); |
| 1333 return result; | 1336 return result; |
| 1334 } | 1337 } |
| 1335 | 1338 |
|
Søren Thygesen Gjesse
2010/01/19 22:59:12
Accidental edit?
Alexandre
2010/01/22 23:08:42
Removed.
On 2010/01/19 22:59:12, Søren Gjesse wrot
| |
| 1336 | 1339 |
| 1340 | |
| 1337 Object* Heap::AllocateHeapNumber(double value) { | 1341 Object* Heap::AllocateHeapNumber(double value) { |
| 1338 // Use general version, if we're forced to always allocate. | 1342 // Use general version, if we're forced to always allocate. |
| 1339 if (always_allocate()) return AllocateHeapNumber(value, TENURED); | 1343 if (always_allocate()) return AllocateHeapNumber(value, TENURED); |
| 1340 | 1344 |
| 1341 // This version of AllocateHeapNumber is optimized for | 1345 // This version of AllocateHeapNumber is optimized for |
| 1342 // allocation in new space. | 1346 // allocation in new space. |
| 1343 STATIC_ASSERT(HeapNumber::kSize <= Page::kMaxHeapObjectSize); | 1347 STATIC_ASSERT(HeapNumber::kSize <= Page::kMaxHeapObjectSize); |
| 1344 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 1348 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
| 1345 Object* result = new_space_.AllocateRaw(HeapNumber::kSize); | 1349 Object* result = new_space_.AllocateRaw(HeapNumber::kSize); |
| 1346 if (result->IsFailure()) return result; | 1350 if (result->IsFailure()) return result; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1393 } | 1397 } |
| 1394 | 1398 |
| 1395 | 1399 |
| 1396 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP | 1400 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 1397 void Heap::CreateRegExpCEntryStub() { | 1401 void Heap::CreateRegExpCEntryStub() { |
| 1398 RegExpCEntryStub stub; | 1402 RegExpCEntryStub stub; |
| 1399 set_re_c_entry_code(*stub.GetCode()); | 1403 set_re_c_entry_code(*stub.GetCode()); |
| 1400 } | 1404 } |
| 1401 #endif | 1405 #endif |
| 1402 | 1406 |
| 1407 #if V8_TARGET_ARCH_MIPS | |
| 1408 void Heap::CreateTestMIPSStub() { | |
| 1409 TestMIPSStub stub; | |
| 1410 set_test_mips_entry_code(*stub.GetCode()); | |
| 1411 } | |
| 1412 #endif | |
| 1403 | 1413 |
| 1404 void Heap::CreateCEntryDebugBreakStub() { | 1414 void Heap::CreateCEntryDebugBreakStub() { |
| 1405 CEntryDebugBreakStub stub; | 1415 CEntryDebugBreakStub stub; |
| 1406 set_c_entry_debug_break_code(*stub.GetCode()); | 1416 set_c_entry_debug_break_code(*stub.GetCode()); |
| 1407 } | 1417 } |
| 1408 | 1418 |
| 1409 | 1419 |
| 1410 void Heap::CreateJSEntryStub() { | 1420 void Heap::CreateJSEntryStub() { |
| 1411 JSEntryStub stub; | 1421 JSEntryStub stub; |
| 1412 set_js_entry_code(*stub.GetCode()); | 1422 set_js_entry_code(*stub.GetCode()); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 1433 // c_entry_debug_break_code_ = *stub.GetCode(); | 1443 // c_entry_debug_break_code_ = *stub.GetCode(); |
| 1434 // } | 1444 // } |
| 1435 // To workaround the problem, make separate functions without inlining. | 1445 // To workaround the problem, make separate functions without inlining. |
| 1436 Heap::CreateCEntryStub(); | 1446 Heap::CreateCEntryStub(); |
| 1437 Heap::CreateCEntryDebugBreakStub(); | 1447 Heap::CreateCEntryDebugBreakStub(); |
| 1438 Heap::CreateJSEntryStub(); | 1448 Heap::CreateJSEntryStub(); |
| 1439 Heap::CreateJSConstructEntryStub(); | 1449 Heap::CreateJSConstructEntryStub(); |
| 1440 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP | 1450 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
| 1441 Heap::CreateRegExpCEntryStub(); | 1451 Heap::CreateRegExpCEntryStub(); |
| 1442 #endif | 1452 #endif |
| 1453 #ifdef V8_TARGET_ARCH_MIPS | |
| 1454 Heap::CreateTestMIPSStub(); | |
| 1455 #endif | |
| 1443 } | 1456 } |
| 1444 | 1457 |
| 1445 | 1458 |
| 1446 bool Heap::CreateInitialObjects() { | 1459 bool Heap::CreateInitialObjects() { |
| 1447 Object* obj; | 1460 Object* obj; |
| 1448 | 1461 |
| 1449 // The -0 value must be set before NumberFromDouble works. | 1462 // The -0 value must be set before NumberFromDouble works. |
| 1450 obj = AllocateHeapNumber(-0.0, TENURED); | 1463 obj = AllocateHeapNumber(-0.0, TENURED); |
| 1451 if (obj->IsFailure()) return false; | 1464 if (obj->IsFailure()) return false; |
| 1452 set_minus_zero_value(obj); | 1465 set_minus_zero_value(obj); |
| (...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4030 for (int i = 0; i < kNumberOfCaches; i++) { | 4043 for (int i = 0; i < kNumberOfCaches; i++) { |
| 4031 if (caches_[i] != NULL) { | 4044 if (caches_[i] != NULL) { |
| 4032 delete caches_[i]; | 4045 delete caches_[i]; |
| 4033 caches_[i] = NULL; | 4046 caches_[i] = NULL; |
| 4034 } | 4047 } |
| 4035 } | 4048 } |
| 4036 } | 4049 } |
| 4037 | 4050 |
| 4038 | 4051 |
| 4039 } } // namespace v8::internal | 4052 } } // namespace v8::internal |
| OLD | NEW |