| 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/profile-generator-inl.h" | 7 #include "src/profile-generator-inl.h" |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 392 } |
| 393 return NULL; | 393 return NULL; |
| 394 } | 394 } |
| 395 | 395 |
| 396 | 396 |
| 397 int CodeMap::GetSharedId(Address addr) { | 397 int CodeMap::GetSharedId(Address addr) { |
| 398 CodeTree::Locator locator; | 398 CodeTree::Locator locator; |
| 399 // For shared function entries, 'size' field is used to store their IDs. | 399 // For shared function entries, 'size' field is used to store their IDs. |
| 400 if (tree_.Find(addr, &locator)) { | 400 if (tree_.Find(addr, &locator)) { |
| 401 const CodeEntryInfo& entry = locator.value(); | 401 const CodeEntryInfo& entry = locator.value(); |
| 402 ASSERT(entry.entry == kSharedFunctionCodeEntry); | 402 DCHECK(entry.entry == kSharedFunctionCodeEntry); |
| 403 return entry.size; | 403 return entry.size; |
| 404 } else { | 404 } else { |
| 405 tree_.Insert(addr, &locator); | 405 tree_.Insert(addr, &locator); |
| 406 int id = next_shared_id_++; | 406 int id = next_shared_id_++; |
| 407 locator.set_value(CodeEntryInfo(kSharedFunctionCodeEntry, id)); | 407 locator.set_value(CodeEntryInfo(kSharedFunctionCodeEntry, id)); |
| 408 return id; | 408 return id; |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 | 411 |
| 412 | 412 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 case OTHER: | 667 case OTHER: |
| 668 case EXTERNAL: | 668 case EXTERNAL: |
| 669 return program_entry_; | 669 return program_entry_; |
| 670 case IDLE: | 670 case IDLE: |
| 671 return idle_entry_; | 671 return idle_entry_; |
| 672 default: return NULL; | 672 default: return NULL; |
| 673 } | 673 } |
| 674 } | 674 } |
| 675 | 675 |
| 676 } } // namespace v8::internal | 676 } } // namespace v8::internal |
| OLD | NEW |