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

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

Issue 1051233002: Reland "Merge old data and pointer space." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 CHECK_EQ(11, CompileRun("foo(0)")->ToInt32(isolate)->Int32Value()); 1542 CHECK_EQ(11, CompileRun("foo(0)")->ToInt32(isolate)->Int32Value());
1543 CHECK_EQ(11, CompileRun("foo(1)")->ToInt32(isolate)->Int32Value()); 1543 CHECK_EQ(11, CompileRun("foo(1)")->ToInt32(isolate)->Int32Value());
1544 CHECK_EQ(12, CompileRun("foo(2)")->ToInt32(isolate)->Int32Value()); 1544 CHECK_EQ(12, CompileRun("foo(2)")->ToInt32(isolate)->Int32Value());
1545 CHECK_EQ(12, CompileRun("foo(3)")->ToInt32(isolate)->Int32Value()); 1545 CHECK_EQ(12, CompileRun("foo(3)")->ToInt32(isolate)->Int32Value());
1546 CHECK_EQ(23, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value()); 1546 CHECK_EQ(23, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value());
1547 CHECK_EQ(23, CompileRun("foo(5)")->ToInt32(isolate)->Int32Value()); 1547 CHECK_EQ(23, CompileRun("foo(5)")->ToInt32(isolate)->Int32Value());
1548 CHECK_EQ(10, CompileRun("foo(6)")->ToInt32(isolate)->Int32Value()); 1548 CHECK_EQ(10, CompileRun("foo(6)")->ToInt32(isolate)->Int32Value());
1549 } 1549 }
1550 isolate->Dispose(); 1550 isolate->Dispose();
1551 } 1551 }
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