| OLD | NEW |
| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Verify that the buffer is 0-terminated | 183 // Verify that the buffer is 0-terminated |
| 184 ASSERT(buffer_[length_] == '\0'); | 184 ASSERT(buffer_[length_] == '\0'); |
| 185 } | 185 } |
| 186 | 186 |
| 187 | 187 |
| 188 void StringStream::PrintObject(Object* o) { | 188 void StringStream::PrintObject(Object* o) { |
| 189 o->ShortPrint(this); | 189 o->ShortPrint(this); |
| 190 if (o->IsString()) { | 190 if (o->IsString()) { |
| 191 if (String::cast(o)->length() <= String::kMaxMediumSize) { | 191 if (String::cast(o)->length() <= String::kMaxShortPrintLength) { |
| 192 return; | 192 return; |
| 193 } | 193 } |
| 194 } else if (o->IsNumber() || o->IsOddball()) { | 194 } else if (o->IsNumber() || o->IsOddball()) { |
| 195 return; | 195 return; |
| 196 } | 196 } |
| 197 if (o->IsHeapObject()) { | 197 if (o->IsHeapObject()) { |
| 198 for (int i = 0; i < debug_object_cache->length(); i++) { | 198 for (int i = 0; i < debug_object_cache->length(); i++) { |
| 199 if ((*debug_object_cache)[i] == o) { | 199 if ((*debug_object_cache)[i] == o) { |
| 200 Add("#%d#", i); | 200 Add("#%d#", i); |
| 201 return; | 201 return; |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 | 575 |
| 576 // Only grow once to the maximum allowable size. | 576 // Only grow once to the maximum allowable size. |
| 577 char* NoAllocationStringAllocator::grow(unsigned* bytes) { | 577 char* NoAllocationStringAllocator::grow(unsigned* bytes) { |
| 578 ASSERT(size_ >= *bytes); | 578 ASSERT(size_ >= *bytes); |
| 579 *bytes = size_; | 579 *bytes = size_; |
| 580 return space_; | 580 return space_; |
| 581 } | 581 } |
| 582 | 582 |
| 583 | 583 |
| 584 } } // namespace v8::internal | 584 } } // namespace v8::internal |
| OLD | NEW |