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

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

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Toon's comments Created 6 years, 1 month 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
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 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 2377
2378 v8::Local<v8::Value> res = CompileRun(source.start()); 2378 v8::Local<v8::Value> res = CompileRun(source.start());
2379 2379
2380 Handle<JSObject> o = 2380 Handle<JSObject> o =
2381 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res)); 2381 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
2382 2382
2383 CHECK(CcTest::heap()->InOldPointerSpace(*o)); 2383 CHECK(CcTest::heap()->InOldPointerSpace(*o));
2384 FieldIndex idx1 = FieldIndex::ForPropertyIndex(o->map(), 0); 2384 FieldIndex idx1 = FieldIndex::ForPropertyIndex(o->map(), 0);
2385 FieldIndex idx2 = FieldIndex::ForPropertyIndex(o->map(), 1); 2385 FieldIndex idx2 = FieldIndex::ForPropertyIndex(o->map(), 1);
2386 CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(idx1))); 2386 CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(idx1)));
2387 CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(idx2))); 2387 if (!FLAG_unbox_double_fields) {
2388 CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(idx2)));
2389 }
Hannes Payer (out of office) 2014/11/06 12:29:46 Can we check the else case here, that we have a do
Igor Sheludko 2014/11/07 08:03:53 Done.
2388 2390
2389 JSObject* inner_object = 2391 JSObject* inner_object =
2390 reinterpret_cast<JSObject*>(o->RawFastPropertyAt(idx1)); 2392 reinterpret_cast<JSObject*>(o->RawFastPropertyAt(idx1));
2391 CHECK(CcTest::heap()->InOldPointerSpace(inner_object)); 2393 CHECK(CcTest::heap()->InOldPointerSpace(inner_object));
2392 CHECK(CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(idx1))); 2394 if (!FLAG_unbox_double_fields) {
2395 CHECK(
2396 CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(idx1)));
2397 }
Hannes Payer (out of office) 2014/11/06 12:29:46 Same here.
Igor Sheludko 2014/11/07 08:03:53 Done.
2393 CHECK(CcTest::heap()->InOldPointerSpace( 2398 CHECK(CcTest::heap()->InOldPointerSpace(
2394 inner_object->RawFastPropertyAt(idx2))); 2399 inner_object->RawFastPropertyAt(idx2)));
2395 } 2400 }
2396 2401
2397 2402
2398 TEST(OptimizedPretenuringDoubleArrayProperties) { 2403 TEST(OptimizedPretenuringDoubleArrayProperties) {
2399 i::FLAG_allow_natives_syntax = true; 2404 i::FLAG_allow_natives_syntax = true;
2400 i::FLAG_expose_gc = true; 2405 i::FLAG_expose_gc = true;
2401 CcTest::InitializeVM(); 2406 CcTest::InitializeVM();
2402 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return; 2407 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
4611 #ifdef DEBUG 4616 #ifdef DEBUG
4612 TEST(PathTracer) { 4617 TEST(PathTracer) {
4613 CcTest::InitializeVM(); 4618 CcTest::InitializeVM();
4614 v8::HandleScope scope(CcTest::isolate()); 4619 v8::HandleScope scope(CcTest::isolate());
4615 4620
4616 v8::Local<v8::Value> result = CompileRun("'abc'"); 4621 v8::Local<v8::Value> result = CompileRun("'abc'");
4617 Handle<Object> o = v8::Utils::OpenHandle(*result); 4622 Handle<Object> o = v8::Utils::OpenHandle(*result);
4618 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4623 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4619 } 4624 }
4620 #endif // DEBUG 4625 #endif // DEBUG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698