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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 | 1726 |
1727 | 1727 |
1728 TEST(InstanceOfStubWriteBarrier) { | 1728 TEST(InstanceOfStubWriteBarrier) { |
1729 i::FLAG_allow_natives_syntax = true; | 1729 i::FLAG_allow_natives_syntax = true; |
1730 #ifdef VERIFY_HEAP | 1730 #ifdef VERIFY_HEAP |
1731 i::FLAG_verify_heap = true; | 1731 i::FLAG_verify_heap = true; |
1732 #endif | 1732 #endif |
1733 | 1733 |
1734 InitializeVM(); | 1734 InitializeVM(); |
1735 if (!i::V8::UseCrankshaft()) return; | 1735 if (!i::V8::UseCrankshaft()) return; |
| 1736 if (i::FLAG_force_marking_deque_overflows) return; |
1736 v8::HandleScope outer_scope; | 1737 v8::HandleScope outer_scope; |
1737 | 1738 |
1738 { | 1739 { |
1739 v8::HandleScope scope; | 1740 v8::HandleScope scope; |
1740 CompileRun( | 1741 CompileRun( |
1741 "function foo () { }" | 1742 "function foo () { }" |
1742 "function mkbar () { return new (new Function(\"\")) (); }" | 1743 "function mkbar () { return new (new Function(\"\")) (); }" |
1743 "function f (x) { return (x instanceof foo); }" | 1744 "function f (x) { return (x instanceof foo); }" |
1744 "function g () { f(mkbar()); }" | 1745 "function g () { f(mkbar()); }" |
1745 "f(new foo()); f(new foo());" | 1746 "f(new foo()); f(new foo());" |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 Handle<Object> call_function(call); | 2505 Handle<Object> call_function(call); |
2505 | 2506 |
2506 // Now we are ready to mess up the heap. | 2507 // Now we are ready to mess up the heap. |
2507 HEAP->CollectAllGarbage(Heap::kReduceMemoryFootprintMask); | 2508 HEAP->CollectAllGarbage(Heap::kReduceMemoryFootprintMask); |
2508 | 2509 |
2509 // Either heap verification caught the problem already or we go kaboom once | 2510 // Either heap verification caught the problem already or we go kaboom once |
2510 // the CallIC is executed the next time. | 2511 // the CallIC is executed the next time. |
2511 USE(global->SetProperty(*name, *call_function, NONE, kNonStrictMode)); | 2512 USE(global->SetProperty(*name, *call_function, NONE, kNonStrictMode)); |
2512 CompileRun("call();"); | 2513 CompileRun("call();"); |
2513 } | 2514 } |
OLD | NEW |