| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 | 2 |
| 3 #include <stdlib.h> | 3 #include <stdlib.h> |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "compilation-cache.h" | 7 #include "compilation-cache.h" |
| 8 #include "execution.h" | 8 #include "execution.h" |
| 9 #include "factory.h" | 9 #include "factory.h" |
| 10 #include "macro-assembler.h" | 10 #include "macro-assembler.h" |
| (...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 v8::Handle<v8::Function> g = | 1774 v8::Handle<v8::Function> g = |
| 1775 v8::Handle<v8::Function>::Cast(global->Get(v8_str("g"))); | 1775 v8::Handle<v8::Function>::Cast(global->Get(v8_str("g"))); |
| 1776 g->Call(global, 0, NULL); | 1776 g->Call(global, 0, NULL); |
| 1777 } | 1777 } |
| 1778 | 1778 |
| 1779 HEAP->incremental_marking()->set_should_hurry(true); | 1779 HEAP->incremental_marking()->set_should_hurry(true); |
| 1780 HEAP->CollectGarbage(OLD_POINTER_SPACE); | 1780 HEAP->CollectGarbage(OLD_POINTER_SPACE); |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 | 1783 |
| 1784 // Implemented in the test-alloc.cc test suite. | |
| 1785 void SimulateFullSpace(PagedSpace* space); | |
| 1786 | |
| 1787 | |
| 1788 TEST(PrototypeTransitionClearing) { | 1784 TEST(PrototypeTransitionClearing) { |
| 1789 InitializeVM(); | 1785 InitializeVM(); |
| 1790 v8::HandleScope scope; | 1786 v8::HandleScope scope; |
| 1791 | 1787 |
| 1792 CompileRun( | 1788 CompileRun( |
| 1793 "var base = {};" | 1789 "var base = {};" |
| 1794 "var live = [];" | 1790 "var live = [];" |
| 1795 "for (var i = 0; i < 10; i++) {" | 1791 "for (var i = 0; i < 10; i++) {" |
| 1796 " var object = {};" | 1792 " var object = {};" |
| 1797 " var prototype = {};" | 1793 " var prototype = {};" |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2506 Handle<Object> call_function(call); | 2502 Handle<Object> call_function(call); |
| 2507 | 2503 |
| 2508 // Now we are ready to mess up the heap. | 2504 // Now we are ready to mess up the heap. |
| 2509 HEAP->CollectAllGarbage(Heap::kReduceMemoryFootprintMask); | 2505 HEAP->CollectAllGarbage(Heap::kReduceMemoryFootprintMask); |
| 2510 | 2506 |
| 2511 // Either heap verification caught the problem already or we go kaboom once | 2507 // Either heap verification caught the problem already or we go kaboom once |
| 2512 // the CallIC is executed the next time. | 2508 // the CallIC is executed the next time. |
| 2513 USE(global->SetProperty(*name, *call_function, NONE, kNonStrictMode)); | 2509 USE(global->SetProperty(*name, *call_function, NONE, kNonStrictMode)); |
| 2514 CompileRun("call();"); | 2510 CompileRun("call();"); |
| 2515 } | 2511 } |
| OLD | NEW |