| 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 8396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8407 | 8407 |
| 8408 | 8408 |
| 8409 if (new_length == 0) return heap->isolate()->factory()->empty_string(); | 8409 if (new_length == 0) return heap->isolate()->factory()->empty_string(); |
| 8410 return string; | 8410 return string; |
| 8411 } | 8411 } |
| 8412 | 8412 |
| 8413 | 8413 |
| 8414 AllocationSiteInfo* AllocationSiteInfo::FindForJSObject(JSObject* object) { | 8414 AllocationSiteInfo* AllocationSiteInfo::FindForJSObject(JSObject* object) { |
| 8415 // Currently, AllocationSiteInfo objects are only allocated immediately | 8415 // Currently, AllocationSiteInfo objects are only allocated immediately |
| 8416 // after JSArrays in NewSpace, and detecting whether a JSArray has one | 8416 // after JSArrays in NewSpace, and detecting whether a JSArray has one |
| 8417 // involves carefully checking the object immediately after the JSArray | 8417 // involves carefuly checking the object immediately after the JSArray |
| 8418 // (if there is one) to see if it's an AllocationSiteInfo. | 8418 // (if there is one) to see if it's an AllocationSiteInfo. |
| 8419 if (FLAG_track_allocation_sites && object->GetHeap()->InNewSpace(object)) { | 8419 if (FLAG_track_allocation_sites && object->GetHeap()->InNewSpace(object)) { |
| 8420 Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) + | 8420 Address ptr_end = (reinterpret_cast<Address>(object) - kHeapObjectTag) + |
| 8421 object->Size(); | 8421 object->Size(); |
| 8422 if ((ptr_end + AllocationSiteInfo::kSize) <= | 8422 if ((ptr_end + AllocationSiteInfo::kSize) <= |
| 8423 object->GetHeap()->NewSpaceTop()) { | 8423 object->GetHeap()->NewSpaceTop()) { |
| 8424 // There is room in newspace for allocation info. Do we have some? | 8424 // There is room in newspace for allocation info. Do we have some? |
| 8425 Map** possible_allocation_site_info_map = | 8425 Map** possible_allocation_site_info_map = |
| 8426 reinterpret_cast<Map**>(ptr_end); | 8426 reinterpret_cast<Map**>(ptr_end); |
| 8427 if (*possible_allocation_site_info_map == | 8427 if (*possible_allocation_site_info_map == |
| (...skipping 6662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15090 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 15090 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 15091 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 15091 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 15092 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 15092 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 15093 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 15093 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 15094 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 15094 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 15095 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 15095 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 15096 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 15096 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 15097 } | 15097 } |
| 15098 | 15098 |
| 15099 } } // namespace v8::internal | 15099 } } // namespace v8::internal |
| OLD | NEW |