Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: test/cctest/test-heap.cc

Issue 18089024: Handlify JSObject::SetPrototype method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/objects.cc ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 prototype = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS, TENURED); 1965 prototype = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS, TENURED);
1966 } 1966 }
1967 1967
1968 // Add a prototype on an evacuation candidate and verify that transition 1968 // Add a prototype on an evacuation candidate and verify that transition
1969 // clearing correctly records slots in prototype transition array. 1969 // clearing correctly records slots in prototype transition array.
1970 i::FLAG_always_compact = true; 1970 i::FLAG_always_compact = true;
1971 Handle<Map> map(baseObject->map()); 1971 Handle<Map> map(baseObject->map());
1972 CHECK(!space->LastPage()->Contains( 1972 CHECK(!space->LastPage()->Contains(
1973 map->GetPrototypeTransitions()->address())); 1973 map->GetPrototypeTransitions()->address()));
1974 CHECK(space->LastPage()->Contains(prototype->address())); 1974 CHECK(space->LastPage()->Contains(prototype->address()));
1975 baseObject->SetPrototype(*prototype, false)->ToObjectChecked(); 1975 JSObject::SetPrototype(baseObject, prototype, false);
1976 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1976 CHECK(Map::GetPrototypeTransition(map, prototype)->IsMap());
1977 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 1977 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
1978 CHECK(map->GetPrototypeTransition(*prototype)->IsMap()); 1978 CHECK(Map::GetPrototypeTransition(map, prototype)->IsMap());
1979 } 1979 }
1980 1980
1981 1981
1982 TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) { 1982 TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
1983 i::FLAG_stress_compaction = false; 1983 i::FLAG_stress_compaction = false;
1984 i::FLAG_allow_natives_syntax = true; 1984 i::FLAG_allow_natives_syntax = true;
1985 #ifdef VERIFY_HEAP 1985 #ifdef VERIFY_HEAP
1986 i::FLAG_verify_heap = true; 1986 i::FLAG_verify_heap = true;
1987 #endif 1987 #endif
1988 1988
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
3313 " var a = new Array(n);" 3313 " var a = new Array(n);"
3314 " for (var i = 0; i < n; i += 100) a[i] = i;" 3314 " for (var i = 0; i < n; i += 100) a[i] = i;"
3315 "};" 3315 "};"
3316 "f(10 * 1024 * 1024);"); 3316 "f(10 * 1024 * 1024);");
3317 IncrementalMarking* marking = HEAP->incremental_marking(); 3317 IncrementalMarking* marking = HEAP->incremental_marking();
3318 if (marking->IsStopped()) marking->Start(); 3318 if (marking->IsStopped()) marking->Start();
3319 // This big step should be sufficient to mark the whole array. 3319 // This big step should be sufficient to mark the whole array.
3320 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3320 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3321 ASSERT(marking->IsComplete()); 3321 ASSERT(marking->IsComplete());
3322 } 3322 }
OLDNEW
« src/objects.cc ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698