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

Side by Side Diff: src/string-stream.cc

Issue 711313002: Reland "In-object double fields unboxing (for 64-bit only)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix 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
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/lithium-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/string-stream.h" 5 #include "src/string-stream.h"
6 6
7 #include "src/handles-inl.h" 7 #include "src/handles-inl.h"
8 #include "src/prototype.h" 8 #include "src/prototype.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 344 }
345 for (; len < 18; len++) 345 for (; len < 18; len++)
346 Put(' '); 346 Put(' ');
347 if (key->IsString()) { 347 if (key->IsString()) {
348 Put(String::cast(key)); 348 Put(String::cast(key));
349 } else { 349 } else {
350 key->ShortPrint(); 350 key->ShortPrint();
351 } 351 }
352 Add(": "); 352 Add(": ");
353 FieldIndex index = FieldIndex::ForDescriptor(map, i); 353 FieldIndex index = FieldIndex::ForDescriptor(map, i);
354 Object* value = js_object->RawFastPropertyAt(index); 354 if (js_object->IsUnboxedDoubleField(index)) {
355 Add("%o\n", value); 355 double value = js_object->RawFastDoublePropertyAt(index);
356 Add("<unboxed double> %.16g\n", FmtElm(value));
357 } else {
358 Object* value = js_object->RawFastPropertyAt(index);
359 Add("%o\n", value);
360 }
356 } 361 }
357 } 362 }
358 } 363 }
359 } 364 }
360 365
361 366
362 void StringStream::PrintFixedArray(FixedArray* array, unsigned int limit) { 367 void StringStream::PrintFixedArray(FixedArray* array, unsigned int limit) {
363 Heap* heap = array->GetHeap(); 368 Heap* heap = array->GetHeap();
364 for (unsigned int i = 0; i < 10 && i < limit; i++) { 369 for (unsigned int i = 0; i < 10 && i < limit; i++) {
365 Object* element = array->get(i); 370 Object* element = array->get(i);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 556 }
552 MemCopy(new_space, space_, *bytes); 557 MemCopy(new_space, space_, *bytes);
553 *bytes = new_bytes; 558 *bytes = new_bytes;
554 DeleteArray(space_); 559 DeleteArray(space_);
555 space_ = new_space; 560 space_ = new_space;
556 return new_space; 561 return new_space;
557 } 562 }
558 563
559 564
560 } } // namespace v8::internal 565 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698