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

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

Issue 1012023002: Merge old data and pointer space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-spaces.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 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 isolate->factory()->NewFunctionFromSharedFunctionInfo( 1067 isolate->factory()->NewFunctionFromSharedFunctionInfo(
1068 copy, isolate->native_context()); 1068 copy, isolate->native_context());
1069 1069
1070 USE(Execution::Call(isolate, copy_fun, global, 0, NULL)); 1070 USE(Execution::Call(isolate, copy_fun, global, 0, NULL));
1071 1071
1072 CHECK_EQ(600000 + 700000, CompileRun("(a + b).length")->Int32Value()); 1072 CHECK_EQ(600000 + 700000, CompileRun("(a + b).length")->Int32Value());
1073 CHECK_EQ(500000 + 600000, CompileRun("(b + c).length")->Int32Value()); 1073 CHECK_EQ(500000 + 600000, CompileRun("(b + c).length")->Int32Value());
1074 Heap* heap = isolate->heap(); 1074 Heap* heap = isolate->heap();
1075 CHECK(heap->InSpace( 1075 CHECK(heap->InSpace(
1076 *v8::Utils::OpenHandle(*CompileRun("a")->ToString(CcTest::isolate())), 1076 *v8::Utils::OpenHandle(*CompileRun("a")->ToString(CcTest::isolate())),
1077 OLD_DATA_SPACE)); 1077 OLD_SPACE));
1078 CHECK(heap->InSpace( 1078 CHECK(heap->InSpace(
1079 *v8::Utils::OpenHandle(*CompileRun("b")->ToString(CcTest::isolate())), 1079 *v8::Utils::OpenHandle(*CompileRun("b")->ToString(CcTest::isolate())),
1080 OLD_DATA_SPACE)); 1080 OLD_SPACE));
1081 CHECK(heap->InSpace( 1081 CHECK(heap->InSpace(
1082 *v8::Utils::OpenHandle(*CompileRun("c")->ToString(CcTest::isolate())), 1082 *v8::Utils::OpenHandle(*CompileRun("c")->ToString(CcTest::isolate())),
1083 OLD_DATA_SPACE)); 1083 OLD_SPACE));
1084 1084
1085 delete cache; 1085 delete cache;
1086 source_a.Dispose(); 1086 source_a.Dispose();
1087 source_b.Dispose(); 1087 source_b.Dispose();
1088 source_c.Dispose(); 1088 source_c.Dispose();
1089 } 1089 }
1090 1090
1091 1091
1092 class SerializerOneByteResource 1092 class SerializerOneByteResource
1093 : public v8::String::ExternalOneByteStringResource { 1093 : public v8::String::ExternalOneByteStringResource {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 v8::Local<v8::Context> context = v8::Context::New(isolate); 1521 v8::Local<v8::Context> context = v8::Context::New(isolate);
1522 delete[] data.data; // We can dispose of the snapshot blob now. 1522 delete[] data.data; // We can dispose of the snapshot blob now.
1523 v8::Context::Scope c_scope(context); 1523 v8::Context::Scope c_scope(context);
1524 v8::Handle<v8::Function> foo = 1524 v8::Handle<v8::Function> foo =
1525 v8::Handle<v8::Function>::Cast(CompileRun("foo")); 1525 v8::Handle<v8::Function>::Cast(CompileRun("foo"));
1526 CHECK(v8::Utils::OpenHandle(*foo)->code()->is_turbofanned()); 1526 CHECK(v8::Utils::OpenHandle(*foo)->code()->is_turbofanned());
1527 CHECK_EQ(3, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value()); 1527 CHECK_EQ(3, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value());
1528 } 1528 }
1529 isolate->Dispose(); 1529 isolate->Dispose();
1530 } 1530 }
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698