| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // The original source code covered by the above license above has been | 31 // The original source code covered by the above license above has been |
| 32 // modified significantly by Google Inc. | 32 // modified significantly by Google Inc. |
| 33 // Copyright 2012 the V8 project authors. All rights reserved. | 33 // Copyright 2012 the V8 project authors. All rights reserved. |
| 34 | 34 |
| 35 #include "src/assembler.h" | 35 #include "src/assembler.h" |
| 36 | 36 |
| 37 #include <cmath> | 37 #include <cmath> |
| 38 #include "src/api.h" | 38 #include "src/api.h" |
| 39 #include "src/base/cpu.h" | 39 #include "src/base/cpu.h" |
| 40 #include "src/base/functional.h" |
| 40 #include "src/base/lazy-instance.h" | 41 #include "src/base/lazy-instance.h" |
| 41 #include "src/base/platform/platform.h" | 42 #include "src/base/platform/platform.h" |
| 42 #include "src/builtins.h" | 43 #include "src/builtins.h" |
| 43 #include "src/codegen.h" | 44 #include "src/codegen.h" |
| 44 #include "src/counters.h" | 45 #include "src/counters.h" |
| 45 #include "src/cpu-profiler.h" | 46 #include "src/cpu-profiler.h" |
| 46 #include "src/debug.h" | 47 #include "src/debug.h" |
| 47 #include "src/deoptimizer.h" | 48 #include "src/deoptimizer.h" |
| 48 #include "src/execution.h" | 49 #include "src/execution.h" |
| 49 #include "src/ic/ic.h" | 50 #include "src/ic/ic.h" |
| (...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(Debug_Break))); | 1515 return ExternalReference(Redirect(isolate, FUNCTION_ADDR(Debug_Break))); |
| 1515 } | 1516 } |
| 1516 | 1517 |
| 1517 | 1518 |
| 1518 ExternalReference ExternalReference::debug_step_in_fp_address( | 1519 ExternalReference ExternalReference::debug_step_in_fp_address( |
| 1519 Isolate* isolate) { | 1520 Isolate* isolate) { |
| 1520 return ExternalReference(isolate->debug()->step_in_fp_addr()); | 1521 return ExternalReference(isolate->debug()->step_in_fp_addr()); |
| 1521 } | 1522 } |
| 1522 | 1523 |
| 1523 | 1524 |
| 1525 bool operator==(ExternalReference lhs, ExternalReference rhs) { |
| 1526 return lhs.address() == rhs.address(); |
| 1527 } |
| 1528 |
| 1529 |
| 1530 bool operator!=(ExternalReference lhs, ExternalReference rhs) { |
| 1531 return !(lhs == rhs); |
| 1532 } |
| 1533 |
| 1534 |
| 1535 size_t hash_value(ExternalReference reference) { |
| 1536 return base::hash<Address>()(reference.address()); |
| 1537 } |
| 1538 |
| 1539 |
| 1540 std::ostream& operator<<(std::ostream& os, ExternalReference reference) { |
| 1541 os << static_cast<const void*>(reference.address()); |
| 1542 const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address()); |
| 1543 if (fn) os << "<" << fn->name << ".entry>"; |
| 1544 return os; |
| 1545 } |
| 1546 |
| 1547 |
| 1524 void PositionsRecorder::RecordPosition(int pos) { | 1548 void PositionsRecorder::RecordPosition(int pos) { |
| 1525 DCHECK(pos != RelocInfo::kNoPosition); | 1549 DCHECK(pos != RelocInfo::kNoPosition); |
| 1526 DCHECK(pos >= 0); | 1550 DCHECK(pos >= 0); |
| 1527 state_.current_position = pos; | 1551 state_.current_position = pos; |
| 1528 LOG_CODE_EVENT(assembler_->isolate(), | 1552 LOG_CODE_EVENT(assembler_->isolate(), |
| 1529 CodeLinePosInfoAddPositionEvent(jit_handler_data_, | 1553 CodeLinePosInfoAddPositionEvent(jit_handler_data_, |
| 1530 assembler_->pc_offset(), | 1554 assembler_->pc_offset(), |
| 1531 pos)); | 1555 pos)); |
| 1532 } | 1556 } |
| 1533 | 1557 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1589 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1566 state_.written_position = state_.current_position; | 1590 state_.written_position = state_.current_position; |
| 1567 written = true; | 1591 written = true; |
| 1568 } | 1592 } |
| 1569 | 1593 |
| 1570 // Return whether something was written. | 1594 // Return whether something was written. |
| 1571 return written; | 1595 return written; |
| 1572 } | 1596 } |
| 1573 | 1597 |
| 1574 } } // namespace v8::internal | 1598 } } // namespace v8::internal |
| OLD | NEW |