| 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/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/base/once.h" | 9 #include "src/base/once.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 g(&masm, functions[i].name, functions[i].extra_args); | 1628 g(&masm, functions[i].name, functions[i].extra_args); |
| 1629 // Move the code into the object heap. | 1629 // Move the code into the object heap. |
| 1630 CodeDesc desc; | 1630 CodeDesc desc; |
| 1631 masm.GetCode(&desc); | 1631 masm.GetCode(&desc); |
| 1632 Code::Flags flags = functions[i].flags; | 1632 Code::Flags flags = functions[i].flags; |
| 1633 Handle<Code> code = | 1633 Handle<Code> code = |
| 1634 isolate->factory()->NewCode(desc, flags, masm.CodeObject()); | 1634 isolate->factory()->NewCode(desc, flags, masm.CodeObject()); |
| 1635 // Log the event and add the code to the builtins array. | 1635 // Log the event and add the code to the builtins array. |
| 1636 PROFILE(isolate, | 1636 PROFILE(isolate, |
| 1637 CodeCreateEvent(Logger::BUILTIN_TAG, *code, functions[i].s_name)); | 1637 CodeCreateEvent(Logger::BUILTIN_TAG, *code, functions[i].s_name)); |
| 1638 GDBJIT(AddCode(GDBJITInterface::BUILTIN, functions[i].s_name, *code)); | |
| 1639 builtins_[i] = *code; | 1638 builtins_[i] = *code; |
| 1640 #ifdef ENABLE_DISASSEMBLER | 1639 #ifdef ENABLE_DISASSEMBLER |
| 1641 if (FLAG_print_builtin_code) { | 1640 if (FLAG_print_builtin_code) { |
| 1642 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); | 1641 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); |
| 1643 OFStream os(trace_scope.file()); | 1642 OFStream os(trace_scope.file()); |
| 1644 os << "Builtin: " << functions[i].s_name << "\n"; | 1643 os << "Builtin: " << functions[i].s_name << "\n"; |
| 1645 code->Disassemble(functions[i].s_name, os); | 1644 code->Disassemble(functions[i].s_name, os); |
| 1646 os << "\n"; | 1645 os << "\n"; |
| 1647 } | 1646 } |
| 1648 #endif | 1647 #endif |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 } | 1711 } |
| 1713 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1712 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1714 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1713 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1715 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1714 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1716 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1715 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1717 #undef DEFINE_BUILTIN_ACCESSOR_C | 1716 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1718 #undef DEFINE_BUILTIN_ACCESSOR_A | 1717 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1719 | 1718 |
| 1720 | 1719 |
| 1721 } } // namespace v8::internal | 1720 } } // namespace v8::internal |
| OLD | NEW |