Home | History | Annotate | Download | only in src

Lines Matching refs:Code

6 //     * Redistributions of source code must retain the above copyright
171 // Reserve no more than 1/8 of the memory for the code range.
274 // and does not count available bytes already in the old space or code
336 PrintF("Code space, used: %8" V8_PTR_PREFIX "d"
464 // Note: as weak callbacks can execute arbitrary code, we cannot
640 "failed to reserve space in the code space");
985 // Visitor class to verify pointers in code or data space do not point into
1683 // We should explicitly record code entry slot for compaction because
1688 Code* code = Code::cast(Code::GetObjectFromEntryAddress(code_entry_slot));
1690 RecordCodeEntrySlot(code_entry_slot, code);
1854 // Scavenging code relies on the fact that new space object
2399 // gcc-4.4 has problem generating correct code of following snippet:
2520 // in JSObjects. The hash code has a special value so that it will not match
2523 // hash code in place. The hash code for the hidden_symbol is zero to ensure
2593 // Allocate cache for external strings pointing to native source code.
2897 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal);
2900 Code* construct_stub =
3035 // can't use the fast case code for short ASCII strings below, but
3264 MaybeObject* Heap::LookupSingleCharacterStringFromCode(uint16_t code) {
3265 if (code <= String::kMaxAsciiCharCode) {
3266 Object* value = single_character_string_cache()->get(code);
3270 buffer[0] = static_cast<char>(code);
3275 single_character_string_cache()->set(code, result);
3284 answer->Set(0, code);
3367 Code::Flags flags,
3370 // Allocate ByteArray before the Code object, so that we do not risk
3371 // leaving uninitialized Code object (and breaking the heap).
3378 int obj_size = Code::SizeFor(body_size);
3381 // Large code objects and code objects which should stay at a fixed address
3394 Code* code = Code::cast(result);
3396 isolate_->code_range()->contains(code->address()));
3397 code->set_instruction_size(desc.instr_size);
3398 code->set_relocation_info(reloc_info);
3399 code->set_flags(flags);
3400 if (code->is_call_stub() || code->is_keyed_call_stub()) {
3401 code->set_check_type(RECEIVER_MAP_CHECK);
3403 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER);
3404 code->set_type_feedback_info(undefined_value(), SKIP_WRITE_BARRIER);
3405 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER);
3406 code->set_gc_metadata(Smi::FromInt(0));
3407 code->set_ic_age(global_ic_age_);
3408 // Allow self references to created code object by patching the handle to
3409 // point to the newly allocated Code object.
3411 *(self_reference.location()) = code;
3413 // Migrate generated code.
3414 // The generated code can contain Object** values (typically from handles)
3416 // objects. These pointers can include references to the code object itself,
3418 code->CopyFrom(desc);
3422 code->Verify();
3425 return code;
3429 MaybeObject* Heap::CopyCode(Code* code) {
3430 // Allocate an object the same size as the code object.
3431 int obj_size = code->Size();
3442 // Copy code object.
3443 Address old_addr = code->address();
3447 Code* new_code = Code::cast(result);
3449 isolate_->code_range()->contains(code->address()));
3455 MaybeObject* Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
3456 // Allocate ByteArray before the Code object, so that we do not risk
3457 // leaving uninitialized Code object (and breaking the heap).
3466 int new_body_size = RoundUp(code->instruction_size(), kObjectAlignment);
3468 int new_obj_size = Code::SizeFor(new_body_size);
3470 Address old_addr = code->address();
3473 static_cast<size_t>(code->instruction_end() - old_addr);
3485 // Copy code object.
3491 Code* new_code = Code::cast(result);
3499 isolate_->code_range()->contains(code->address()));
3504 code->Verify();
3536 function->set_code(shared->code());
3751 // verification code has to cope with (temporarily) invalid objects. See
4965 // compilation cache to avoid hanging on to source code and
4966 // generated code for cached functions.
5004 PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title);
5006 // We do not look for code in new space, map space, or old space. If code
5040 PrintF("Code space : ");
5441 // We only have code, sequential strings, or fixed arrays in large
5510 // Iterate over the builtin code objects and code stubs in the
5511 // heap. Note that it is not necessary to iterate over code objects
5537 // Iterate over the pointers the Serialization/Deserialization code is
5574 // of memory for each semispace because code in the snapshot has
5575 // write-barrier code that relies on the size and alignment of new
5915 // Initialize the code space, set its maximum capacity to the old
5917 // On 64-bit platform(s), we put all code objects in a 2 GB range of
5940 // The large object code space may contain code or data. We set the memory
5942 // explicitly when allocating large code objects.