| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 // Uninitialize hash field as the hash seed may have changed. | 713 // Uninitialize hash field as the hash seed may have changed. |
| 714 string->set_hash_field(String::kEmptyHashField); | 714 string->set_hash_field(String::kEmptyHashField); |
| 715 if (string->IsInternalizedString()) { | 715 if (string->IsInternalizedString()) { |
| 716 DisallowHeapAllocation no_gc; | 716 DisallowHeapAllocation no_gc; |
| 717 HandleScope scope(isolate_); | 717 HandleScope scope(isolate_); |
| 718 StringTableInsertionKey key(string); | 718 StringTableInsertionKey key(string); |
| 719 String* canonical = *StringTable::LookupKey(isolate_, &key); | 719 String* canonical = *StringTable::LookupKey(isolate_, &key); |
| 720 string->SetForwardedInternalizedString(canonical); | 720 string->SetForwardedInternalizedString(canonical); |
| 721 return canonical; | 721 return canonical; |
| 722 } | 722 } |
| 723 } else if (obj->IsScript()) { |
| 724 Script::cast(obj)->set_id(isolate_->heap()->NextScriptId()); |
| 723 } | 725 } |
| 724 return obj; | 726 return obj; |
| 725 } | 727 } |
| 726 | 728 |
| 727 | 729 |
| 728 HeapObject* Deserializer::GetBackReferencedObject(int space) { | 730 HeapObject* Deserializer::GetBackReferencedObject(int space) { |
| 729 HeapObject* obj; | 731 HeapObject* obj; |
| 730 BackReference back_reference(source_.GetInt()); | 732 BackReference back_reference(source_.GetInt()); |
| 731 if (space == LO_SPACE) { | 733 if (space == LO_SPACE) { |
| 732 CHECK(back_reference.chunk_index() == 0); | 734 CHECK(back_reference.chunk_index() == 0); |
| (...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 DisallowHeapAllocation no_gc; | 2533 DisallowHeapAllocation no_gc; |
| 2532 SerializedCodeData* scd = new SerializedCodeData(cached_data); | 2534 SerializedCodeData* scd = new SerializedCodeData(cached_data); |
| 2533 SanityCheckResult r = scd->SanityCheck(isolate, source); | 2535 SanityCheckResult r = scd->SanityCheck(isolate, source); |
| 2534 if (r == CHECK_SUCCESS) return scd; | 2536 if (r == CHECK_SUCCESS) return scd; |
| 2535 cached_data->Reject(); | 2537 cached_data->Reject(); |
| 2536 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 2538 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
| 2537 delete scd; | 2539 delete scd; |
| 2538 return NULL; | 2540 return NULL; |
| 2539 } | 2541 } |
| 2540 } } // namespace v8::internal | 2542 } } // namespace v8::internal |
| OLD | NEW |