OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5939 SMI_ACCESSORS(Script, line_offset, kLineOffsetOffset) | 5939 SMI_ACCESSORS(Script, line_offset, kLineOffsetOffset) |
5940 SMI_ACCESSORS(Script, column_offset, kColumnOffsetOffset) | 5940 SMI_ACCESSORS(Script, column_offset, kColumnOffsetOffset) |
5941 ACCESSORS(Script, context_data, Object, kContextOffset) | 5941 ACCESSORS(Script, context_data, Object, kContextOffset) |
5942 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset) | 5942 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset) |
5943 SMI_ACCESSORS(Script, type, kTypeOffset) | 5943 SMI_ACCESSORS(Script, type, kTypeOffset) |
5944 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) | 5944 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) |
5945 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset, | 5945 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset, |
5946 this->type() != TYPE_WASM) | 5946 this->type() != TYPE_WASM) |
5947 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset, | 5947 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset, |
5948 this->type() != TYPE_WASM) | 5948 this->type() != TYPE_WASM) |
5949 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset) | 5949 ACCESSORS(Script, shared_function_infos, FixedArray, kSharedFunctionInfosOffset) |
5950 SMI_ACCESSORS(Script, flags, kFlagsOffset) | 5950 SMI_ACCESSORS(Script, flags, kFlagsOffset) |
5951 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) | 5951 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) |
5952 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) | 5952 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) |
5953 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset, | 5953 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset, |
5954 this->type() == TYPE_WASM) | 5954 this->type() == TYPE_WASM) |
5955 | 5955 |
5956 Script::CompilationType Script::compilation_type() { | 5956 Script::CompilationType Script::compilation_type() { |
5957 return BooleanBit::get(flags(), kCompilationTypeBit) ? | 5957 return BooleanBit::get(flags(), kCompilationTypeBit) ? |
5958 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; | 5958 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; |
5959 } | 5959 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6055 BOOL_ACCESSORS(SharedFunctionInfo, | 6055 BOOL_ACCESSORS(SharedFunctionInfo, |
6056 compiler_hints, | 6056 compiler_hints, |
6057 uses_arguments, | 6057 uses_arguments, |
6058 kUsesArguments) | 6058 kUsesArguments) |
6059 BOOL_ACCESSORS(SharedFunctionInfo, | 6059 BOOL_ACCESSORS(SharedFunctionInfo, |
6060 compiler_hints, | 6060 compiler_hints, |
6061 has_duplicate_parameters, | 6061 has_duplicate_parameters, |
6062 kHasDuplicateParameters) | 6062 kHasDuplicateParameters) |
6063 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction) | 6063 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction) |
6064 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized) | 6064 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized) |
6065 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, never_compiled, | |
6066 kNeverCompiled) | |
6067 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_declaration, | 6065 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_declaration, |
6068 kIsDeclaration) | 6066 kIsDeclaration) |
6069 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, marked_for_tier_up, | 6067 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, marked_for_tier_up, |
6070 kMarkedForTierUp) | 6068 kMarkedForTierUp) |
6071 | 6069 |
6072 #if V8_HOST_ARCH_32_BIT | 6070 #if V8_HOST_ARCH_32_BIT |
6073 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) | 6071 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) |
6074 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count, | 6072 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count, |
6075 kFormalParameterCountOffset) | 6073 kFormalParameterCountOffset) |
6076 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, | 6074 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6277 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); | 6275 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); |
6278 flusher->EvictCandidate(this); | 6276 flusher->EvictCandidate(this); |
6279 } | 6277 } |
6280 | 6278 |
6281 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); | 6279 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); |
6282 #ifdef DEBUG | 6280 #ifdef DEBUG |
6283 Code::VerifyRecompiledCode(code(), value); | 6281 Code::VerifyRecompiledCode(code(), value); |
6284 #endif // DEBUG | 6282 #endif // DEBUG |
6285 | 6283 |
6286 set_code(value); | 6284 set_code(value); |
6287 | |
6288 if (is_compiled()) set_never_compiled(false); | |
6289 } | 6285 } |
6290 | 6286 |
6291 bool SharedFunctionInfo::IsInterpreted() const { | 6287 bool SharedFunctionInfo::IsInterpreted() const { |
6292 return code()->is_interpreter_trampoline_builtin(); | 6288 return code()->is_interpreter_trampoline_builtin(); |
6293 } | 6289 } |
6294 | 6290 |
6295 bool SharedFunctionInfo::HasBaselineCode() const { | 6291 bool SharedFunctionInfo::HasBaselineCode() const { |
6296 return code()->kind() == Code::FUNCTION; | 6292 return code()->kind() == Code::FUNCTION; |
6297 } | 6293 } |
6298 | 6294 |
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8470 #undef WRITE_INT64_FIELD | 8466 #undef WRITE_INT64_FIELD |
8471 #undef READ_BYTE_FIELD | 8467 #undef READ_BYTE_FIELD |
8472 #undef WRITE_BYTE_FIELD | 8468 #undef WRITE_BYTE_FIELD |
8473 #undef NOBARRIER_READ_BYTE_FIELD | 8469 #undef NOBARRIER_READ_BYTE_FIELD |
8474 #undef NOBARRIER_WRITE_BYTE_FIELD | 8470 #undef NOBARRIER_WRITE_BYTE_FIELD |
8475 | 8471 |
8476 } // namespace internal | 8472 } // namespace internal |
8477 } // namespace v8 | 8473 } // namespace v8 |
8478 | 8474 |
8479 #endif // V8_OBJECTS_INL_H_ | 8475 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |