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

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

Issue 587663003: Fix test: manually call GC since 0 allocations will not cause GC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | 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 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after
2854 AddTransitions(transitions_count); 2854 AddTransitions(transitions_count);
2855 CompileRun("var root = new F;"); 2855 CompileRun("var root = new F;");
2856 Handle<JSObject> root = GetByName("root"); 2856 Handle<JSObject> root = GetByName("root");
2857 2857
2858 // Count number of live transitions before marking. 2858 // Count number of live transitions before marking.
2859 int transitions_before = CountMapTransitions(root->map()); 2859 int transitions_before = CountMapTransitions(root->map());
2860 CHECK_EQ(transitions_count, transitions_before); 2860 CHECK_EQ(transitions_count, transitions_before);
2861 2861
2862 root = GetByName("root"); 2862 root = GetByName("root");
2863 AddPropertyTo(0, root, "prop9"); 2863 AddPropertyTo(0, root, "prop9");
2864 CcTest::i_isolate()->heap()->CollectGarbage(OLD_POINTER_SPACE);
2864 2865
2865 // Count number of live transitions after marking. Note that one transition 2866 // Count number of live transitions after marking. Note that one transition
2866 // is left, because 'o' still holds an instance of one transition target. 2867 // is left, because 'o' still holds an instance of one transition target.
2867 int transitions_after = CountMapTransitions( 2868 int transitions_after = CountMapTransitions(
2868 Map::cast(root->map()->GetBackPointer())); 2869 Map::cast(root->map()->GetBackPointer()));
2869 CHECK_EQ(1, transitions_after); 2870 CHECK_EQ(1, transitions_after);
2870 } 2871 }
2871 2872
2872 2873
2873 TEST(TransitionArraySimpleToFull) { 2874 TEST(TransitionArraySimpleToFull) {
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 #ifdef DEBUG 4508 #ifdef DEBUG
4508 TEST(PathTracer) { 4509 TEST(PathTracer) {
4509 CcTest::InitializeVM(); 4510 CcTest::InitializeVM();
4510 v8::HandleScope scope(CcTest::isolate()); 4511 v8::HandleScope scope(CcTest::isolate());
4511 4512
4512 v8::Local<v8::Value> result = CompileRun("'abc'"); 4513 v8::Local<v8::Value> result = CompileRun("'abc'");
4513 Handle<Object> o = v8::Utils::OpenHandle(*result); 4514 Handle<Object> o = v8::Utils::OpenHandle(*result);
4514 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4515 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4515 } 4516 }
4516 #endif // DEBUG 4517 #endif // DEBUG
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698