Lines Matching defs:code
2 // Use of this source code is governed by a BSD-style license that can be
10 #include "src/code-factory.h"
11 #include "src/code-stubs.h"
51 // NONE indicates that the scope shouldn't actually generate code to set up
60 void LCodeGen::FinishCode(Handle<Code> code) {
62 code->set_stack_slots(GetStackSlotCount());
63 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
64 if (code->is_optimized_code()) RegisterWeakObjectsInOptimizedCode(code);
65 PopulateDeoptimizationData(code);
152 // Reserve space for the stack slots needed by the code.
232 // We have not executed any compiled code yet, so cp still holds the
269 LDeferredCode* code = deferred_[i];
272 instructions_->at(code->instruction_index())->hydrogen_value();
278 code->instruction_index(),
279 code->instr()->hydrogen_value()->id(),
280 code->instr()->Mnemonic());
281 __ bind(code->entry());
291 Comment(";;; Deferred code");
293 code->Generate();
301 __ jmp(code->exit());
305 // Force constant pool emission at the end of the deferred code to make
315 // code, i.e. that offsets to the table can be encoded in the 24bit signed
317 // To simplify we consider the code size from the first instruction to the
405 // sequence. Mark the generated code as done unless we bailed out.
730 int LCodeGen::CallCodeSize(Handle<Code> code, RelocInfo::Mode mode) {
731 int size = masm()->CallSize(code, mode);
732 if (code->kind() == Code::BINARY_OP_IC ||
733 code->kind() == Code::COMPARE_IC) {
740 void LCodeGen::CallCode(Handle<Code> code,
744 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT, storage_mode);
748 void LCodeGen::CallCodeGeneric(Handle<Code> code,
754 // Block literal pool emission to ensure nop indicating no inlined smi code
757 __ Call(code, mode, TypeFeedbackId::None(), al, storage_mode);
760 // Signal that we don't inline smi code before these stubs in the
761 // optimizing code generator.
762 if (code->kind() == Code::BINARY_OP_IC ||
763 code->kind() == Code::COMPARE_IC) {
930 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
970 code->set_deoptimization_data(*data);
1144 // Theoretically, a variation of the branch-free code for integer division by
1234 // For 'r3 = r1 % r2' we can have the following ARM code:
1382 // TODO(svenpanne) Refactor this to avoid code duplication with DoFlooringDivI.
1558 // TODO(svenpanne) Refactor this to avoid code duplication with DoDivI.
1665 // For other constants we emit standard code.
1685 // Generate standard code.
2174 Handle<Code> code =
2175 CodeFactory::BinaryOpIC(isolate(), instr->op(), NO_OVERWRITE).code();
2176 // Block literal pool emission to ensure nop indicating no inlined smi code
2179 CallCode(code, RelocInfo::CODE_TARGET, instr);
2611 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
2613 // This instruction also signals no smi code inlined.
2707 // Faster code path to avoid two compares: subtract lower bound from the
2823 __ bind(deferred->map_check()); // Label for calculating code patching.
2832 __ bind(deferred->load_bool()); // Label for calculating code patching.
2841 // calling the deferred code.
2852 // Go to the deferred code.
2858 // Here result has either true or false. Deferred code also produces true or
2884 // Make sure that code size is predicable, since we use specific constants
2885 // offsets in the code to find embedded values..
2927 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
2929 // This instruction also signals no smi code inlined.
2945 // Runtime::TraceExit returns its parameter in r0. We're leaving the code
3018 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code();
3140 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code();
3431 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
4010 Handle<Code> code = Handle<Code>::cast(ToHandle(target));
4011 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET));
4014 __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al,
4025 __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag));
4044 // Load the code entry address
4069 // No cell in r2 for construct type feedback in optimized code
4129 __ add(code_object, code_object, Operand(Code::kHeaderSize - kHeapObjectTag));
4237 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
4458 Handle<Code> ic =
4459 CodeFactory::KeyedStoreIC(isolate(), instr->strict_mode()).code();
4938 // The carry flag is set when we reach this deferred code as we just executed
5024 // Branch to deferred code if the input was tagged.
5025 // The deferred code will take care of restoring the tag.
5486 // Use the fast case closure allocation code that allocates in new
5625 // instruction for patching the code here.
5710 Handle<Code> stack_check = isolate()->builtins()->StackCheck();
5731 // the deferred code.