| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 isolate_->logger()->removeCodeEventListener(this); | 509 isolate_->logger()->removeCodeEventListener(this); |
| 510 } | 510 } |
| 511 | 511 |
| 512 virtual void CodeMoveEvent(Address from, Address to) { | 512 virtual void CodeMoveEvent(Address from, Address to) { |
| 513 address_to_name_map_.Move(from, to); | 513 address_to_name_map_.Move(from, to); |
| 514 } | 514 } |
| 515 | 515 |
| 516 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { | 516 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { |
| 517 } | 517 } |
| 518 | 518 |
| 519 virtual void CodeDeleteEvent(Address from) { | |
| 520 address_to_name_map_.Remove(from); | |
| 521 } | |
| 522 | |
| 523 const char* Lookup(Address address) { | 519 const char* Lookup(Address address) { |
| 524 return address_to_name_map_.Lookup(address); | 520 return address_to_name_map_.Lookup(address); |
| 525 } | 521 } |
| 526 | 522 |
| 527 private: | 523 private: |
| 528 class NameMap { | 524 class NameMap { |
| 529 public: | 525 public: |
| 530 NameMap() : impl_(HashMap::PointersMatch) {} | 526 NameMap() : impl_(HashMap::PointersMatch) {} |
| 531 | 527 |
| 532 ~NameMap() { | 528 ~NameMap() { |
| (...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 DisallowHeapAllocation no_gc; | 2660 DisallowHeapAllocation no_gc; |
| 2665 SerializedCodeData* scd = new SerializedCodeData(cached_data); | 2661 SerializedCodeData* scd = new SerializedCodeData(cached_data); |
| 2666 SanityCheckResult r = scd->SanityCheck(source); | 2662 SanityCheckResult r = scd->SanityCheck(source); |
| 2667 if (r == CHECK_SUCCESS) return scd; | 2663 if (r == CHECK_SUCCESS) return scd; |
| 2668 cached_data->Reject(); | 2664 cached_data->Reject(); |
| 2669 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 2665 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
| 2670 delete scd; | 2666 delete scd; |
| 2671 return NULL; | 2667 return NULL; |
| 2672 } | 2668 } |
| 2673 } } // namespace v8::internal | 2669 } } // namespace v8::internal |
| OLD | NEW |