Home | History | Annotate | Download | only in src

Lines Matching refs:Code

6 //     * Redistributions of source code must retain the above copyright
30 #include "code-stubs.h"
776 ASSERT(function->code() == function->shared()->code());
789 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile);
798 Code* code = shared->code();
799 MarkBit code_mark = Marking::MarkBitFrom(code);
804 candidate->set_code(shared->code());
807 // We are in the middle of a GC cycle so the write barrier in the code
810 Code* target = Code::cast(Code::GetObjectFromEntryAddress(slot));
824 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile);
832 Code* code = candidate->code();
833 MarkBit code_mark = Marking::MarkBitFrom(code);
869 Code* code = candidate->code();
871 code->address() + Code::kGCMetadataOffset);
876 candidate->code()->gc_metadata());
881 candidate->code()->set_gc_metadata(next_candidate);
1049 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
1055 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
1067 Code* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
1180 Code* code = reinterpret_cast<Code*>(object);
1182 Object* raw_info = code->type_feedback_info();
1193 code->CodeIterateBody<StaticMarkingVisitor>(heap);
1196 // Code flushing support.
1198 // How many collections newly compiled code object will survive before being
1212 return function->code() !=
1217 return function->code() !=
1224 // Code is either on stack, in compilation cache or referenced
1226 MarkBit code_mark = Marking::MarkBitFrom(function->code());
1234 // We do not flush code for optimized functions.
1235 if (function->code() != shared_info->code()) {
1243 // Code is either on stack, in compilation cache or referenced
1246 Marking::MarkBitFrom(shared_info->code());
1251 // The function must be compiled and have the source code available,
1257 // We never flush code for Api functions.
1263 // Only flush code for functions.
1264 if (shared_info->code()->kind() != Code::FUNCTION) {
1273 // If this is a full script wrapped in a function we do no flush the code.
1291 // This function's code looks flushable. But we have to postpone the
1294 // That would make the nonoptimized version of the code nonflushable,
1295 // because it is required for bailing out from optimized code.
1325 // Make sure this is a RegExp that actually contains code.
1328 Object* code = re->DataAtUnchecked(JSRegExp::code_index(is_ascii));
1329 if (!code->IsSmi() &&
1330 HeapObject::cast(code)->map()->instance_type() == CODE_TYPE) {
1331 // Save a copy that can be reinstated if we need the code again.
1333 code,
1343 RecordSlot(slot, slot, code);
1349 } else if (code->IsSmi()) {
1350 int value = Smi::cast(code)->value();
1371 // code object place in the data array of the RegExp and keeps a copy
1373 // If we did not use the code for kRegExpCodeThreshold mark sweep GCs
1374 // we flush the code.
1383 // Flush code or set age on both ASCII and two byte code.
1425 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
1426 MarkBit mark = Marking::MarkBitFrom(code);
1427 heap->mark_compact_collector()->MarkObject(code, mark);
1429 RecordCodeEntrySlot(entry_address, code);
1463 Code* code = jsfunction->shared()->code();
1464 MarkBit code_mark = Marking::MarkBitFrom(code);
1465 collector->MarkObject(code, code_mark);
1467 if (jsfunction->code()->kind() == Code::OPTIMIZED_FUNCTION) {
1468 collector->MarkInlinedFunctionsCode(jsfunction->code());
1501 // Don't visit code object.
1615 MarkBit code_mark = Marking::MarkBitFrom(shared->code());
1616 collector_->MarkObject(shared->code(), code_mark);
1626 void MarkCompactCollector::MarkInlinedFunctionsCode(Code* code) {
1628 // of it's code and non-optimized version of all inlined functions.
1629 // This is required to support bailing out from inlined code.
1631 DeoptimizationInputData::cast(code->deoptimization_data());
1639 Code* inlined_code = inlined->shared()->code();
1650 // StackFrame::unchecked_code will return a non-optimized code object for
1652 // actual optimized code object.
1654 Code* code = frame->unchecked_code();
1655 MarkBit code_mark = Marking::MarkBitFrom(code);
1656 MarkObject(code, code_mark);
1667 // TODO(1609) Currently incremental marker does not support code flushing.
1689 // Make sure we are not referencing the code from the stack.
1695 // the code is referenced.
2385 // Flush code from collected candidates.
2688 Code::cast(HeapObject::FromAddress(dst))->Relocate(dst - src);
2720 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
2722 rinfo->set_target_address(Code::cast(target)->instruction_start());
2730 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
2732 rinfo->set_call_address(Code::cast(target)->instruction_start());
2835 // There are soft limits in the allocation code, designed trigger a mark
3023 Code::cast(obj)->CodeIterateBody(v);
3061 // be iterated precisely, hitting only the live objects. Code space
3143 static bool SetMarkBitsUnderInvalidatedCode(Code* code, bool value) {
3144 Page* p = Page::FromAddress(code->address());
3151 Address code_start = code->address();
3152 Address code_end = code_start + code->Size();
3199 // In code space only bits on evacuation candidates (but we don't record
3200 // any slots on them) and under invalidated code objects are non-zero.
3208 void MarkCompactCollector::InvalidateCode(Code* code) {
3210 !ShouldSkipEvacuationSlotRecording(code)) {
3214 MarkBit mark_bit = Marking::MarkBitFrom(code);
3217 invalidated_code_.Add(code);
3227 Code* code = invalidated_code_[i];
3229 if (SetMarkBitsUnderInvalidatedCode(code, true)) {
3249 Code* code = invalidated_code_[i];
3250 if (code != NULL) {
3251 code->Iterate(visitor);
3252 SetMarkBitsUnderInvalidatedCode(code, false);
3352 // code objects from non-updated pc pointing into evacuation candidate.
3416 // Visit invalidated code (we ignored all slots on it) and clear mark-bits
3985 // code objects. We should either reenable it or change our tools.
3990 GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj));
4061 void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) {