Lines Matching defs:code
2 // Use of this source code is governed by a BSD-style license that can be
11 #include "src/code-stubs.h"
101 entry.code = EncodeExternal(type, id);
103 DCHECK_NE(0, entry.code);
104 // Assert that the code is added in ascending order to rule out duplicates.
105 DCHECK((size() == 0) || (code(size() - 1) < entry.code));
180 "Code::MakeCodeYoung");
202 "Code::MarkCodeAsExecuted");
257 // NOTE: This function was originally 100k of code. It has since been
259 // very easily cause code bloat. Please be careful in the future when adding
406 // deopt table code, which isn't possible at deserialization time.
434 ExternalReferenceTable::instance(isolate_)->code
471 Put(external_references->code(i), external_references->address(i));
499 virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) {
583 virtual void LogRecordedBuffer(Code* code,
587 address_to_name_map_.Insert(code->address(), name, length);
654 // Issue code events for newly deserialized code objects.
672 // Keep track of the code space start and end pointers in case new
673 // code objects were unserialized
678 // There's no code deserialized here. If this assert fires
680 // the profiler et al of the new code.
796 // Fix up strings from serialized user code.
891 Code* new_code_object = reinterpret_cast<Code*>(new_object); \
904 Code::cast(HeapObject::FromAddress(current_object_address)), \
1056 // code object.
1059 // Deserialize a new code object and write a pointer to its first
1060 // instruction to the current code object.
1068 // Deserialize a new object from pointer found in code and write
1073 // Find a recently deserialized code object using its offset from the
1079 // Find a recently deserialized code object using its offset from the
1081 // to the current code object or the instruction pointer in a function
1093 // Find an object in the roots array and write a pointer to it to in code.
1104 // Find an code entry in the partial snapshots cache and
1119 // code object.
1129 // Find a builtin code entry and write a pointer to it to the current
1134 // Find a builtin and write a pointer to it in the current code object.
1427 // The code-caches link to context-specific code objects, which
1607 Code* object = Code::GetCodeFromTargetAddress(rinfo->target_address());
1615 Code* object = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
1657 static Code* CloneCodeObject(HeapObject* code) {
1658 Address copy = new byte[code->Size()];
1659 MemCopy(copy, code->address(), code->Size());
1660 return Code::cast(HeapObject::FromAddress(copy));
1664 static void WipeOutRelocations(Code* code) {
1670 for (RelocIterator it(code, mode_mask); !it.done(); it.next()) {
1691 // Output the code all at once and fix later.
1707 // We always end up here if we are outputting the code of a code object.
1712 // To make snapshots reproducible, we need to wipe out all pointers in code.
1714 Code* code = CloneCodeObject(object_);
1715 WipeOutRelocations(code);
1718 code->WipeOutHeader();
1719 object_start = code->address();
1722 const char* description = code_object_ ? "Code" : "Byte";
1788 // Serialize code object.
1819 // The code-caches link to context-specific code objects, which
1842 Code* code_object = Code::cast(heap_object);
1843 if (code_object->kind() == Code::BUILTIN) {
1892 void CodeSerializer::SerializeBuiltin(Code* builtin, HowToCode how_to_code,
1916 void CodeSerializer::SerializeCodeStub(Code* code, HowToCode how_to_code,
1921 uint32_t stub_key = code->stub_key();
1925 PrintF("Encoding uncacheable code stub as heap object\n");
1927 SerializeHeapObject(code, how_to_code, where_to_point, skip);
1939 PrintF("Encoding code stub %s as %d\n",
2048 // Copy code stub keys.