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

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

Issue 11028027: Revert trunk to bleeding_edge at r12484 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 2 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/spaces-inl.h ('k') | src/transitions.h » ('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 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 342
343 void StringStream::PrintUsingMap(JSObject* js_object) { 343 void StringStream::PrintUsingMap(JSObject* js_object) {
344 Map* map = js_object->map(); 344 Map* map = js_object->map();
345 if (!HEAP->Contains(map) || 345 if (!HEAP->Contains(map) ||
346 !map->IsHeapObject() || 346 !map->IsHeapObject() ||
347 !map->IsMap()) { 347 !map->IsMap()) {
348 Add("<Invalid map>\n"); 348 Add("<Invalid map>\n");
349 return; 349 return;
350 } 350 }
351 int real_size = map->NumberOfOwnDescriptors();
352 DescriptorArray* descs = map->instance_descriptors(); 351 DescriptorArray* descs = map->instance_descriptors();
353 for (int i = 0; i < descs->number_of_descriptors(); i++) { 352 for (int i = 0; i < descs->number_of_descriptors(); i++) {
354 PropertyDetails details = descs->GetDetails(i); 353 if (descs->GetType(i) == FIELD) {
355 if (details.descriptor_index() > real_size) continue;
356 if (details.type() == FIELD) {
357 Object* key = descs->GetKey(i); 354 Object* key = descs->GetKey(i);
358 if (key->IsString() || key->IsNumber()) { 355 if (key->IsString() || key->IsNumber()) {
359 int len = 3; 356 int len = 3;
360 if (key->IsString()) { 357 if (key->IsString()) {
361 len = String::cast(key)->length(); 358 len = String::cast(key)->length();
362 } 359 }
363 for (; len < 18; len++) 360 for (; len < 18; len++)
364 Put(' '); 361 Put(' ');
365 if (key->IsString()) { 362 if (key->IsString()) {
366 Put(String::cast(key)); 363 Put(String::cast(key));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 580
584 // Only grow once to the maximum allowable size. 581 // Only grow once to the maximum allowable size.
585 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 582 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
586 ASSERT(size_ >= *bytes); 583 ASSERT(size_ >= *bytes);
587 *bytes = size_; 584 *bytes = size_;
588 return space_; 585 return space_;
589 } 586 }
590 587
591 588
592 } } // namespace v8::internal 589 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces-inl.h ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698