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 "execution.h" | 7 #include "execution.h" |
8 #include "factory.h" | 8 #include "factory.h" |
9 #include "macro-assembler.h" | 9 #include "macro-assembler.h" |
10 #include "global-handles.h" | 10 #include "global-handles.h" |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 } | 952 } |
953 | 953 |
954 // Check function is compiled. | 954 // Check function is compiled. |
955 Object* func_value = Isolate::Current()->context()->global()-> | 955 Object* func_value = Isolate::Current()->context()->global()-> |
956 GetProperty(*foo_name)->ToObjectChecked(); | 956 GetProperty(*foo_name)->ToObjectChecked(); |
957 CHECK(func_value->IsJSFunction()); | 957 CHECK(func_value->IsJSFunction()); |
958 Handle<JSFunction> function(JSFunction::cast(func_value)); | 958 Handle<JSFunction> function(JSFunction::cast(func_value)); |
959 CHECK(function->shared()->is_compiled()); | 959 CHECK(function->shared()->is_compiled()); |
960 | 960 |
961 // TODO(1609) Currently incremental marker does not support code flushing. | 961 // TODO(1609) Currently incremental marker does not support code flushing. |
962 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 962 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
963 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 963 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
964 | 964 |
965 CHECK(function->shared()->is_compiled()); | 965 CHECK(function->shared()->is_compiled()); |
966 | 966 |
967 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 967 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
968 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 968 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
969 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 969 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
970 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 970 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
971 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 971 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
972 HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask); | 972 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
973 | 973 |
974 // foo should no longer be in the compilation cache | 974 // foo should no longer be in the compilation cache |
975 CHECK(!function->shared()->is_compiled() || function->IsOptimized()); | 975 CHECK(!function->shared()->is_compiled() || function->IsOptimized()); |
976 CHECK(!function->is_compiled() || function->IsOptimized()); | 976 CHECK(!function->is_compiled() || function->IsOptimized()); |
977 // Call foo to get it recompiled. | 977 // Call foo to get it recompiled. |
978 CompileRun("foo()"); | 978 CompileRun("foo()"); |
979 CHECK(function->shared()->is_compiled()); | 979 CHECK(function->shared()->is_compiled()); |
980 CHECK(function->is_compiled()); | 980 CHECK(function->is_compiled()); |
981 } | 981 } |
982 | 982 |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 // clearing correctly records slots in prototype transition array. | 1590 // clearing correctly records slots in prototype transition array. |
1591 i::FLAG_always_compact = true; | 1591 i::FLAG_always_compact = true; |
1592 Handle<Map> map(baseObject->map()); | 1592 Handle<Map> map(baseObject->map()); |
1593 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address())); | 1593 CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address())); |
1594 CHECK(space->LastPage()->Contains(prototype->address())); | 1594 CHECK(space->LastPage()->Contains(prototype->address())); |
1595 baseObject->SetPrototype(*prototype, false)->ToObjectChecked(); | 1595 baseObject->SetPrototype(*prototype, false)->ToObjectChecked(); |
1596 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); | 1596 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); |
1597 HEAP->CollectAllGarbage(Heap::kNoGCFlags); | 1597 HEAP->CollectAllGarbage(Heap::kNoGCFlags); |
1598 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); | 1598 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); |
1599 } | 1599 } |
OLD | NEW |