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

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

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove Mips changes Created 7 years, 6 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 | « src/x64/stub-cache-x64.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 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 v8::Context::GetCurrent()->Global()->Set(v8_str("fun2"), fun2); 2491 v8::Context::GetCurrent()->Global()->Set(v8_str("fun2"), fun2);
2492 CompileRun("function f(a, b) { a(); b(); } f(fun1, fun2);"); 2492 CompileRun("function f(a, b) { a(); b(); } f(fun1, fun2);");
2493 Handle<JSFunction> f = 2493 Handle<JSFunction> f =
2494 v8::Utils::OpenHandle( 2494 v8::Utils::OpenHandle(
2495 *v8::Handle<v8::Function>::Cast( 2495 *v8::Handle<v8::Function>::Cast(
2496 v8::Context::GetCurrent()->Global()->Get(v8_str("f")))); 2496 v8::Context::GetCurrent()->Global()->Get(v8_str("f"))));
2497 Handle<TypeFeedbackCells> cells(TypeFeedbackInfo::cast( 2497 Handle<TypeFeedbackCells> cells(TypeFeedbackInfo::cast(
2498 f->shared()->code()->type_feedback_info())->type_feedback_cells()); 2498 f->shared()->code()->type_feedback_info())->type_feedback_cells());
2499 2499
2500 CHECK_EQ(2, cells->CellCount()); 2500 CHECK_EQ(2, cells->CellCount());
2501 CHECK(cells->Cell(0)->value()->IsJSFunction()); 2501 CHECK(cells->GetCell(0)->value()->IsJSFunction());
2502 CHECK(cells->Cell(1)->value()->IsJSFunction()); 2502 CHECK(cells->GetCell(1)->value()->IsJSFunction());
2503 2503
2504 SimulateIncrementalMarking(); 2504 SimulateIncrementalMarking();
2505 HEAP->CollectAllGarbage(Heap::kNoGCFlags); 2505 HEAP->CollectAllGarbage(Heap::kNoGCFlags);
2506 2506
2507 CHECK_EQ(2, cells->CellCount()); 2507 CHECK_EQ(2, cells->CellCount());
2508 CHECK(cells->Cell(0)->value()->IsTheHole()); 2508 CHECK(cells->GetCell(0)->value()->IsTheHole());
2509 CHECK(cells->Cell(1)->value()->IsTheHole()); 2509 CHECK(cells->GetCell(1)->value()->IsTheHole());
2510 } 2510 }
2511 2511
2512 2512
2513 static Code* FindFirstIC(Code* code, Code::Kind kind) { 2513 static Code* FindFirstIC(Code* code, Code::Kind kind) {
2514 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | 2514 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
2515 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | 2515 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) |
2516 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) | 2516 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) |
2517 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_CONTEXT); 2517 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_CONTEXT);
2518 for (RelocIterator it(code, mask); !it.done(); it.next()) { 2518 for (RelocIterator it(code, mask); !it.done(); it.next()) {
2519 RelocInfo* info = it.rinfo(); 2519 RelocInfo* info = it.rinfo();
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 " var a = new Array(n);" 3171 " var a = new Array(n);"
3172 " for (var i = 0; i < n; i += 100) a[i] = i;" 3172 " for (var i = 0; i < n; i += 100) a[i] = i;"
3173 "};" 3173 "};"
3174 "f(10 * 1024 * 1024);"); 3174 "f(10 * 1024 * 1024);");
3175 IncrementalMarking* marking = HEAP->incremental_marking(); 3175 IncrementalMarking* marking = HEAP->incremental_marking();
3176 if (marking->IsStopped()) marking->Start(); 3176 if (marking->IsStopped()) marking->Start();
3177 // This big step should be sufficient to mark the whole array. 3177 // This big step should be sufficient to mark the whole array.
3178 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3178 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3179 ASSERT(marking->IsComplete()); 3179 ASSERT(marking->IsComplete());
3180 } 3180 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698