Home | History | Annotate | Download | only in src

Lines Matching defs:code

6 //     * Redistributions of source code must retain the above copyright
216 ASSERT(!HEAP->InNewSpace(object)); // Code only works for old objects.
226 ASSERT(!HEAP->InNewSpace(object)); // Code only works for old objects.
268 // and does not count available bytes already in the old space or code
336 PrintF("Code space, used: %8" V8_PTR_PREFIX "d"
468 // Note: as weak callbacks can execute arbitrary code, we cannot
896 // Visitor class to verify pointers in code or data space do not point into
1003 // there are no intergenerational pointers in code or data spaces.
1979 // gcc-4.4 has problem generating correct code of following snippet:
2094 // in JSObjects. The hash code has a special value so that it will not match
2097 // hash code in place. The hash code for the hidden_symbol is zero to ensure
2151 // Allocate cache for external strings pointing to native source code.
2349 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal);
2352 Code* construct_stub = isolate_->builtins()->builtin(
2481 // can't use the fast case code for short ascii strings below, but
2656 MaybeObject* Heap::LookupSingleCharacterStringFromCode(uint16_t code) {
2657 if (code <= String::kMaxAsciiCharCode) {
2658 Object* value = single_character_string_cache()->get(code);
2662 buffer[0] = static_cast<char>(code);
2667 single_character_string_cache()->set(code, result);
2676 answer->Set(0, code);
2757 Code::Flags flags,
2760 // Allocate ByteArray before the Code object, so that we do not risk
2761 // leaving uninitialized Code object (and breaking the heap).
2769 int obj_size = Code::SizeFor(body_size);
2772 // Large code objects and code objects which should stay at a fixed address
2785 Code* code = Code::cast(result);
2787 isolate_->code_range()->contains(code->address()));
2788 code->set_instruction_size(desc.instr_size);
2789 code->set_relocation_info(ByteArray::cast(reloc_info));
2790 code->set_flags(flags);
2791 if (code->is_call_stub() || code->is_keyed_call_stub()) {
2792 code->set_check_type(RECEIVER_MAP_CHECK);
2794 code->set_deoptimization_data(empty_fixed_array());
2795 // Allow self references to created code object by patching the handle to
2796 // point to the newly allocated Code object.
2798 *(self_reference.location()) = code;
2800 // Migrate generated code.
2801 // The generated code can contain Object** values (typically from handles)
2803 // objects. These pointers can include references to the code object itself,
2805 code->CopyFrom(desc);
2808 code->Verify();
2810 return code;
2814 MaybeObject* Heap::CopyCode(Code* code) {
2815 // Allocate an object the same size as the code object.
2816 int obj_size = code->Size();
2827 // Copy code object.
2828 Address old_addr = code->address();
2832 Code* new_code = Code::cast(result);
2834 isolate_->code_range()->contains(code->address()));
2840 MaybeObject* Heap::CopyCode(Code* code, Vector<byte> reloc_info) {
2841 // Allocate ByteArray before the Code object, so that we do not risk
2842 // leaving uninitialized Code object (and breaking the heap).
2851 int new_body_size = RoundUp(code->instruction_size(), kObjectAlignment);
2853 int new_obj_size = Code::SizeFor(new_body_size);
2855 Address old_addr = code->address();
2858 code->instruction_end() - old_addr);
2870 // Copy code object.
2876 Code* new_code = Code::cast(result);
2884 isolate_->code_range()->contains(code->address()));
2888 code->Verify();
2921 function->set_code(shared->code());
3126 // verification code has to cope with (temporarily) invalid objects. See
3883 // compilation cache to avoid hanging on to source code and
3884 // generated code for cached functions.
3940 PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title);
3942 // We do not look for code in new space, map space, or old space. If code
3976 PrintF("Code space : ");
4497 // Iterate over the builtin code objects and code stubs in the
4498 // heap. Note that it is not necessary to iterate over code objects
4517 // Iterate over the pointers the Serialization/Deserialization code is
4545 // of memory for each semispace because code in the snapshot has
4546 // write-barrier code that relies on the size and alignment of new
4877 // Initialize the code space, set its maximum capacity to the old
4879 // On 64-bit platform(s), we put all code objects in a 2 GB range of
4906 // The large object code space may contain code or data. We set the memory
4908 // explicitly when allocating large code objects.
5272 // For code space, using FreeListNode::IsFreeListNode is OK.