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

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

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 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
« no previous file with comments | « test/cctest/test-disasm-x64.cc ('k') | test/cctest/test-regexp.cc » ('j') | 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 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 CcTest::InitializeVM(); 3047 CcTest::InitializeVM();
3048 v8::HandleScope scope(CcTest::isolate()); 3048 v8::HandleScope scope(CcTest::isolate());
3049 const char* source = "f = function() { return 987654321; }\n" 3049 const char* source = "f = function() { return 987654321; }\n"
3050 "g = function() { return 123456789; }\n"; 3050 "g = function() { return 123456789; }\n";
3051 CompileRun(source); 3051 CompileRun(source);
3052 Handle<JSFunction> g = 3052 Handle<JSFunction> g =
3053 v8::Utils::OpenHandle( 3053 v8::Utils::OpenHandle(
3054 *v8::Handle<v8::Function>::Cast( 3054 *v8::Handle<v8::Function>::Cast(
3055 CcTest::global()->Get(v8_str("g")))); 3055 CcTest::global()->Get(v8_str("g"))));
3056 3056
3057 DisallowHeapAllocation no_allocation; 3057 OFStream os(stdout);
3058 g->shared()->PrintLn(); 3058 g->shared()->Print(os);
3059 os << endl;
3059 } 3060 }
3060 #endif // OBJECT_PRINT 3061 #endif // OBJECT_PRINT
3061 3062
3062 3063
3063 TEST(Regress2211) { 3064 TEST(Regress2211) {
3064 CcTest::InitializeVM(); 3065 CcTest::InitializeVM();
3065 v8::HandleScope scope(CcTest::isolate()); 3066 v8::HandleScope scope(CcTest::isolate());
3066 3067
3067 v8::Handle<v8::String> value = v8_str("val string"); 3068 v8::Handle<v8::String> value = v8_str("val string");
3068 Smi* hash = Smi::FromInt(321); 3069 Smi* hash = Smi::FromInt(321);
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4407 #ifdef DEBUG 4408 #ifdef DEBUG
4408 TEST(PathTracer) { 4409 TEST(PathTracer) {
4409 CcTest::InitializeVM(); 4410 CcTest::InitializeVM();
4410 v8::HandleScope scope(CcTest::isolate()); 4411 v8::HandleScope scope(CcTest::isolate());
4411 4412
4412 v8::Local<v8::Value> result = CompileRun("'abc'"); 4413 v8::Local<v8::Value> result = CompileRun("'abc'");
4413 Handle<Object> o = v8::Utils::OpenHandle(*result); 4414 Handle<Object> o = v8::Utils::OpenHandle(*result);
4414 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4415 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4415 } 4416 }
4416 #endif // DEBUG 4417 #endif // DEBUG
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-x64.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698