| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 13 matching lines...) Expand all Loading... |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "api.h" | 30 #include "api.h" |
| 31 #include "arguments.h" | 31 #include "arguments.h" |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "builtins.h" | 33 #include "builtins.h" |
| 34 #include "gdb-jit.h" | 34 #include "code-events.h" |
| 35 #include "ic-inl.h" | 35 #include "ic-inl.h" |
| 36 #include "heap-profiler.h" | 36 #include "heap-profiler.h" |
| 37 #include "mark-compact.h" | 37 #include "mark-compact.h" |
| 38 #include "vm-state-inl.h" | 38 #include "vm-state-inl.h" |
| 39 | 39 |
| 40 namespace v8 { | 40 namespace v8 { |
| 41 namespace internal { | 41 namespace internal { |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| (...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 if (!maybe_code->ToObject(&code)) { | 1636 if (!maybe_code->ToObject(&code)) { |
| 1637 v8::internal::V8::FatalProcessOutOfMemory("CreateCode"); | 1637 v8::internal::V8::FatalProcessOutOfMemory("CreateCode"); |
| 1638 } | 1638 } |
| 1639 } | 1639 } |
| 1640 } | 1640 } |
| 1641 // Log the event and add the code to the builtins array. | 1641 // Log the event and add the code to the builtins array. |
| 1642 PROFILE(isolate, | 1642 PROFILE(isolate, |
| 1643 CodeCreateEvent(Logger::BUILTIN_TAG, | 1643 CodeCreateEvent(Logger::BUILTIN_TAG, |
| 1644 Code::cast(code), | 1644 Code::cast(code), |
| 1645 functions[i].s_name)); | 1645 functions[i].s_name)); |
| 1646 GDBJIT(AddCode(GDBJITInterface::BUILTIN, | 1646 JIT_CODE_EVENT(AddCode(functions[i].s_name, |
| 1647 functions[i].s_name, | 1647 Code::cast(code))); |
| 1648 Code::cast(code))); | |
| 1649 builtins_[i] = code; | 1648 builtins_[i] = code; |
| 1650 #ifdef ENABLE_DISASSEMBLER | 1649 #ifdef ENABLE_DISASSEMBLER |
| 1651 if (FLAG_print_builtin_code) { | 1650 if (FLAG_print_builtin_code) { |
| 1652 PrintF("Builtin: %s\n", functions[i].s_name); | 1651 PrintF("Builtin: %s\n", functions[i].s_name); |
| 1653 Code::cast(code)->Disassemble(functions[i].s_name); | 1652 Code::cast(code)->Disassemble(functions[i].s_name); |
| 1654 PrintF("\n"); | 1653 PrintF("\n"); |
| 1655 } | 1654 } |
| 1656 #endif | 1655 #endif |
| 1657 } else { | 1656 } else { |
| 1658 // Deserializing. The values will be filled in during IterateBuiltins. | 1657 // Deserializing. The values will be filled in during IterateBuiltins. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 return Handle<Code>(code_address); \ | 1702 return Handle<Code>(code_address); \ |
| 1704 } | 1703 } |
| 1705 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1704 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1706 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1705 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1707 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1706 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1708 #undef DEFINE_BUILTIN_ACCESSOR_C | 1707 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1709 #undef DEFINE_BUILTIN_ACCESSOR_A | 1708 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1710 | 1709 |
| 1711 | 1710 |
| 1712 } } // namespace v8::internal | 1711 } } // namespace v8::internal |
| OLD | NEW |