Lines Matching defs:code

2 // Use of this source code is governed by a BSD-style license that can be
100 // Allocate objects needed for code initialization.
158 Handle<Code> code;
161 .ToHandle(&code)) {
164 } else if (!AllocateCode(retry_allocation_or_fail).ToHandle(&code)) {
169 Code raw_code = *code;
200 // Allow self references to created code object by patching the handle to
210 self_reference, code);
212 self_reference.PatchValue(*code);
223 // Migrate generated code.
224 // The generated code can contain embedded objects (typically from
228 // the code object itself, through the self_reference parameter.
252 code->Disassemble(nullptr, os, isolate_);
264 return code;
283 // Return an empty handle if we cannot allocate the code object.
287 // The code object has not been fully initialized yet. We rely on the
292 Handle<Code> code = handle(Code::cast(result), isolate_);
294 DCHECK(IsAligned(code->address(), kCodeAlignment));
297 heap->code_region().contains(code->address()));
299 return code;
315 // The code object has not been fully initialized yet. We rely on the
320 Handle<Code> code = handle(Code::cast(result), local_isolate_);
321 DCHECK_IMPLIES(is_executable_, IsAligned(code->address(), kCodeAlignment));
322 return code;
946 Handle<String> Factory::LookupSingleCharacterStringFromCode(uint16_t code) {
947 if (code <= unibrow::Latin1::kMaxChar) {
950 Object value = single_character_string_cache()->get(code);
955 uint8_t buffer[] = {static_cast<uint8_t>(code)};
958 single_character_string_cache()->set(code, *result);
961 uint16_t buffer[] = {code};
1983 // TODO(gsathya): Do not copy hash code.
2091 DCHECK(!src->IsTransitionArray()); // Compacted by GC, this code doesn't work
2287 Handle<Code> Factory::NewOffHeapTrampolineFor(Handle<Code> code,
2291 CHECK(Builtins::IsIsolateIndependentBuiltin(*code));
2294 Builtins::CodeObjectIsExecutable(code->builtin_id());
2297 code->code_data_container(kAcquireLoad).kind_specific_flags(kRelaxedLoad),
2307 // The trampoline code object must inherit specific flags from the original
2312 Code raw_code = *code;
2347 // Also update flag values cached on the code data container.
2356 Handle<Code> Factory::CopyCode(Handle<Code> code) {
2358 code->code_data_container(kAcquireLoad).kind_specific_flags(kRelaxedLoad),
2364 int obj_size = code->Size();
2370 // Copy code object.
2371 Address old_addr = code->address();
2383 // Record all references to embedded objects in the new code object.
2389 data_container->initialize_flags(code->kind(), code->builtin_id());
2518 // verification code has to cope with (temporarily) invalid objects. See
3946 Handle<Code> code = handle(FromCodeT(sfi_->GetCode()), isolate_);
3947 Handle<JSFunction> result = BuildRaw(code);
3949 if (code->kind() == CodeKind::BASELINE) {
3958 Handle<JSFunction> Factory::JSFunctionBuilder::BuildRaw(Handle<Code> code) {
3980 function.set_code(*code, kReleaseStore, mode);