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

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

Issue 7341: Allocate room for expected number of properties based on the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/runtime.cc ('k') | src/stub-cache-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 len = String::cast(key)->length(); 310 len = String::cast(key)->length();
311 } 311 }
312 for (; len < 18; len++) 312 for (; len < 18; len++)
313 Put(' '); 313 Put(' ');
314 if (key->IsString()) { 314 if (key->IsString()) {
315 Put(String::cast(key)); 315 Put(String::cast(key));
316 } else { 316 } else {
317 key->ShortPrint(); 317 key->ShortPrint();
318 } 318 }
319 Add(": "); 319 Add(": ");
320 Object* value = js_object->properties()->get(r.GetFieldIndex()); 320 Object* value = js_object->FastPropertyAt(r.GetFieldIndex());
321 Add("%o\n", value); 321 Add("%o\n", value);
322 } 322 }
323 } 323 }
324 break; 324 break;
325 default: 325 default:
326 break; 326 break;
327 } 327 }
328 } 328 }
329 } 329 }
330 330
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 unsigned new_bytes = *bytes * 2; 541 unsigned new_bytes = *bytes * 2;
542 if (new_bytes > size_) { 542 if (new_bytes > size_) {
543 new_bytes = size_; 543 new_bytes = size_;
544 } 544 }
545 *bytes = new_bytes; 545 *bytes = new_bytes;
546 return space_; 546 return space_;
547 } 547 }
548 548
549 549
550 } } // namespace v8::internal 550 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698