| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 // If we do not flush code, or have the compilation cache turned off, this | 1565 // If we do not flush code, or have the compilation cache turned off, this |
| 1566 // test is invalid. | 1566 // test is invalid. |
| 1567 if (!FLAG_flush_code || !FLAG_compilation_cache) { | 1567 if (!FLAG_flush_code || !FLAG_compilation_cache) { |
| 1568 return; | 1568 return; |
| 1569 } | 1569 } |
| 1570 CcTest::InitializeVM(); | 1570 CcTest::InitializeVM(); |
| 1571 Isolate* isolate = CcTest::i_isolate(); | 1571 Isolate* isolate = CcTest::i_isolate(); |
| 1572 Factory* factory = isolate->factory(); | 1572 Factory* factory = isolate->factory(); |
| 1573 Heap* heap = isolate->heap(); | 1573 Heap* heap = isolate->heap(); |
| 1574 CompilationCache* compilation_cache = isolate->compilation_cache(); | 1574 CompilationCache* compilation_cache = isolate->compilation_cache(); |
| 1575 LanguageMode language_mode = | 1575 LanguageMode language_mode = construct_language_mode(FLAG_use_strict); |
| 1576 construct_language_mode(FLAG_use_strict, FLAG_use_strong); | |
| 1577 | 1576 |
| 1578 v8::HandleScope scope(CcTest::isolate()); | 1577 v8::HandleScope scope(CcTest::isolate()); |
| 1579 const char* raw_source = | 1578 const char* raw_source = |
| 1580 "function foo() {" | 1579 "function foo() {" |
| 1581 " var x = 42;" | 1580 " var x = 42;" |
| 1582 " var y = 42;" | 1581 " var y = 42;" |
| 1583 " var z = x + y;" | 1582 " var z = x + y;" |
| 1584 "};" | 1583 "};" |
| 1585 "foo()"; | 1584 "foo()"; |
| 1586 Handle<String> source = factory->InternalizeUtf8String(raw_source); | 1585 Handle<String> source = factory->InternalizeUtf8String(raw_source); |
| (...skipping 5016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6603 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); | 6602 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); |
| 6604 } | 6603 } |
| 6605 } | 6604 } |
| 6606 // Force allocation from the free list. | 6605 // Force allocation from the free list. |
| 6607 heap->set_force_oom(true); | 6606 heap->set_force_oom(true); |
| 6608 heap->CollectGarbage(OLD_SPACE); | 6607 heap->CollectGarbage(OLD_SPACE); |
| 6609 } | 6608 } |
| 6610 | 6609 |
| 6611 } // namespace internal | 6610 } // namespace internal |
| 6612 } // namespace v8 | 6611 } // namespace v8 |
| OLD | NEW |