OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 7973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7984 Heap* heap = GetHeap(); | 7984 Heap* heap = GetHeap(); |
7985 if (start == 0 && end == length()) return this; | 7985 if (start == 0 && end == length()) return this; |
7986 MaybeObject* result = heap->AllocateSubString(this, start, end, pretenure); | 7986 MaybeObject* result = heap->AllocateSubString(this, start, end, pretenure); |
7987 return result; | 7987 return result; |
7988 } | 7988 } |
7989 | 7989 |
7990 | 7990 |
7991 void String::PrintOn(FILE* file) { | 7991 void String::PrintOn(FILE* file) { |
7992 int length = this->length(); | 7992 int length = this->length(); |
7993 for (int i = 0; i < length; i++) { | 7993 for (int i = 0; i < length; i++) { |
7994 fprintf(file, "%c", Get(i)); | 7994 PrintF(file, "%c", Get(i)); |
7995 } | 7995 } |
7996 } | 7996 } |
7997 | 7997 |
7998 | 7998 |
7999 static void TrimEnumCache(Heap* heap, Map* map, DescriptorArray* descriptors) { | 7999 static void TrimEnumCache(Heap* heap, Map* map, DescriptorArray* descriptors) { |
8000 int live_enum = map->EnumLength(); | 8000 int live_enum = map->EnumLength(); |
8001 if (live_enum == Map::kInvalidEnumCache) { | 8001 if (live_enum == Map::kInvalidEnumCache) { |
8002 live_enum = map->NumberOfDescribedProperties(OWN_DESCRIPTORS, DONT_ENUM); | 8002 live_enum = map->NumberOfDescribedProperties(OWN_DESCRIPTORS, DONT_ENUM); |
8003 } | 8003 } |
8004 if (live_enum == 0) return descriptors->ClearEnumCache(); | 8004 if (live_enum == 0) return descriptors->ClearEnumCache(); |
(...skipping 6460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14465 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14465 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14466 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14466 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14467 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14467 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14468 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14468 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14469 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14469 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14470 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14470 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14471 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14471 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14472 } | 14472 } |
14473 | 14473 |
14474 } } // namespace v8::internal | 14474 } } // namespace v8::internal |
OLD | NEW |