Home | History | Annotate | Download | only in src

Lines Matching refs:Code

6 //     * Redistributions of source code must retain the above copyright
31 #include "code-stubs.h"
40 bool CodeStub::FindCodeInCache(Code** code_out) {
44 *code_out = Code::cast(heap->code_stubs()->ValueAt(index));
52 // Update the static counter each time a new code stub is generated.
58 // Generate the code for the stub.
75 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
76 code->set_major_key(MajorKey());
80 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, *name));
81 GDBJIT(AddCode(GDBJITInterface::STUB, *name, code));
83 counters->total_stubs_code_size()->Increment(code->instruction_size());
87 code->Disassemble(*name);
95 return Code::STUB;
99 Handle<Code> CodeStub::GetCode() {
103 Code* code;
105 ? FindCodeInSpecialCache(&code)
106 : FindCodeInCache(&code)) {
107 ASSERT(IsPregenerated() == code->is_pregenerated());
108 return Handle<Code>(code);
114 // Generate the new code.
118 // Create the code object.
122 // Copy the generated code into a heap object.
123 Code::Flags flags = Code::ComputeFlags(
124 static_cast<Code::Kind>(GetCodeKind()),
126 Handle<Code> new_object = factory->NewCode(
142 code = *new_object;
145 Activate(code);
146 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code));
147 return Handle<Code>(code, isolate);
171 void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
181 bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
184 Code::Flags flags = Code::ComputeFlags(
185 static_cast<Code::Kind>(GetCodeKind()),
190 *code_out = Code::cast(*probe);
255 void JSEntryStub::FinishCode(Handle<Code> code) {
257 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
259 code->set_handler_table(*handler_table);