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

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: 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
« src/x64/stub-cache-x64.cc ('K') | « 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 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 2317
2318 v8::Local<v8::Value> res = CompileRun(source.start()); 2318 v8::Local<v8::Value> res = CompileRun(source.start());
2319 2319
2320 Handle<JSObject> o = 2320 Handle<JSObject> o =
2321 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res)); 2321 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
2322 2322
2323 CHECK(CcTest::heap()->InOldPointerSpace(*o)); 2323 CHECK(CcTest::heap()->InOldPointerSpace(*o));
2324 FieldIndex idx1 = FieldIndex::ForPropertyIndex(o->map(), 0); 2324 FieldIndex idx1 = FieldIndex::ForPropertyIndex(o->map(), 0);
2325 FieldIndex idx2 = FieldIndex::ForPropertyIndex(o->map(), 1); 2325 FieldIndex idx2 = FieldIndex::ForPropertyIndex(o->map(), 1);
2326 CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(idx1))); 2326 CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(idx1)));
2327 CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(idx2))); 2327 if (!FLAG_unbox_double_fields) {
2328 CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(idx2)));
2329 }
2328 2330
2329 JSObject* inner_object = 2331 JSObject* inner_object =
2330 reinterpret_cast<JSObject*>(o->RawFastPropertyAt(idx1)); 2332 reinterpret_cast<JSObject*>(o->RawFastPropertyAt(idx1));
2331 CHECK(CcTest::heap()->InOldPointerSpace(inner_object)); 2333 CHECK(CcTest::heap()->InOldPointerSpace(inner_object));
2332 CHECK(CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(idx1))); 2334 if (!FLAG_unbox_double_fields) {
2335 CHECK(
2336 CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(idx1)));
2337 }
2333 CHECK(CcTest::heap()->InOldPointerSpace( 2338 CHECK(CcTest::heap()->InOldPointerSpace(
2334 inner_object->RawFastPropertyAt(idx2))); 2339 inner_object->RawFastPropertyAt(idx2)));
2335 } 2340 }
2336 2341
2337 2342
2338 TEST(OptimizedPretenuringDoubleArrayProperties) { 2343 TEST(OptimizedPretenuringDoubleArrayProperties) {
2339 i::FLAG_allow_natives_syntax = true; 2344 i::FLAG_allow_natives_syntax = true;
2340 i::FLAG_expose_gc = true; 2345 i::FLAG_expose_gc = true;
2341 CcTest::InitializeVM(); 2346 CcTest::InitializeVM();
2342 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return; 2347 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 #ifdef DEBUG 4414 #ifdef DEBUG
4410 TEST(PathTracer) { 4415 TEST(PathTracer) {
4411 CcTest::InitializeVM(); 4416 CcTest::InitializeVM();
4412 v8::HandleScope scope(CcTest::isolate()); 4417 v8::HandleScope scope(CcTest::isolate());
4413 4418
4414 v8::Local<v8::Value> result = CompileRun("'abc'"); 4419 v8::Local<v8::Value> result = CompileRun("'abc'");
4415 Handle<Object> o = v8::Utils::OpenHandle(*result); 4420 Handle<Object> o = v8::Utils::OpenHandle(*result);
4416 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4421 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4417 } 4422 }
4418 #endif // DEBUG 4423 #endif // DEBUG
OLDNEW
« src/x64/stub-cache-x64.cc ('K') | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698