Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: src/objects-inl.h

Issue 2577063002: Reland of "Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID" (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/parsing/parse-info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5943 matching lines...) Expand 10 before | Expand all | Expand 10 after
5954 SMI_ACCESSORS(Script, line_offset, kLineOffsetOffset) 5954 SMI_ACCESSORS(Script, line_offset, kLineOffsetOffset)
5955 SMI_ACCESSORS(Script, column_offset, kColumnOffsetOffset) 5955 SMI_ACCESSORS(Script, column_offset, kColumnOffsetOffset)
5956 ACCESSORS(Script, context_data, Object, kContextOffset) 5956 ACCESSORS(Script, context_data, Object, kContextOffset)
5957 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset) 5957 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset)
5958 SMI_ACCESSORS(Script, type, kTypeOffset) 5958 SMI_ACCESSORS(Script, type, kTypeOffset)
5959 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) 5959 ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
5960 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset, 5960 ACCESSORS_CHECKED(Script, eval_from_shared, Object, kEvalFromSharedOffset,
5961 this->type() != TYPE_WASM) 5961 this->type() != TYPE_WASM)
5962 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset, 5962 SMI_ACCESSORS_CHECKED(Script, eval_from_position, kEvalFromPositionOffset,
5963 this->type() != TYPE_WASM) 5963 this->type() != TYPE_WASM)
5964 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset) 5964 ACCESSORS(Script, shared_function_infos, FixedArray, kSharedFunctionInfosOffset)
5965 SMI_ACCESSORS(Script, flags, kFlagsOffset) 5965 SMI_ACCESSORS(Script, flags, kFlagsOffset)
5966 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) 5966 ACCESSORS(Script, source_url, Object, kSourceUrlOffset)
5967 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) 5967 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset)
5968 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset, 5968 ACCESSORS_CHECKED(Script, wasm_compiled_module, Object, kEvalFromSharedOffset,
5969 this->type() == TYPE_WASM) 5969 this->type() == TYPE_WASM)
5970 5970
5971 Script::CompilationType Script::compilation_type() { 5971 Script::CompilationType Script::compilation_type() {
5972 return BooleanBit::get(flags(), kCompilationTypeBit) ? 5972 return BooleanBit::get(flags(), kCompilationTypeBit) ?
5973 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; 5973 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
5974 } 5974 }
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
6070 BOOL_ACCESSORS(SharedFunctionInfo, 6070 BOOL_ACCESSORS(SharedFunctionInfo,
6071 compiler_hints, 6071 compiler_hints,
6072 uses_arguments, 6072 uses_arguments,
6073 kUsesArguments) 6073 kUsesArguments)
6074 BOOL_ACCESSORS(SharedFunctionInfo, 6074 BOOL_ACCESSORS(SharedFunctionInfo,
6075 compiler_hints, 6075 compiler_hints,
6076 has_duplicate_parameters, 6076 has_duplicate_parameters,
6077 kHasDuplicateParameters) 6077 kHasDuplicateParameters)
6078 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction) 6078 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction)
6079 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized) 6079 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized)
6080 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, never_compiled,
6081 kNeverCompiled)
6082 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_declaration, 6080 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_declaration,
6083 kIsDeclaration) 6081 kIsDeclaration)
6084 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, marked_for_tier_up, 6082 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, marked_for_tier_up,
6085 kMarkedForTierUp) 6083 kMarkedForTierUp)
6086 6084
6087 #if V8_HOST_ARCH_32_BIT 6085 #if V8_HOST_ARCH_32_BIT
6088 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) 6086 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
6089 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count, 6087 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count,
6090 kFormalParameterCountOffset) 6088 kFormalParameterCountOffset)
6091 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, 6089 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
6292 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); 6290 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher();
6293 flusher->EvictCandidate(this); 6291 flusher->EvictCandidate(this);
6294 } 6292 }
6295 6293
6296 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); 6294 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL);
6297 #ifdef DEBUG 6295 #ifdef DEBUG
6298 Code::VerifyRecompiledCode(code(), value); 6296 Code::VerifyRecompiledCode(code(), value);
6299 #endif // DEBUG 6297 #endif // DEBUG
6300 6298
6301 set_code(value); 6299 set_code(value);
6302
6303 if (is_compiled()) set_never_compiled(false);
6304 } 6300 }
6305 6301
6306 bool SharedFunctionInfo::IsInterpreted() const { 6302 bool SharedFunctionInfo::IsInterpreted() const {
6307 return code()->is_interpreter_trampoline_builtin(); 6303 return code()->is_interpreter_trampoline_builtin();
6308 } 6304 }
6309 6305
6310 bool SharedFunctionInfo::HasBaselineCode() const { 6306 bool SharedFunctionInfo::HasBaselineCode() const {
6311 return code()->kind() == Code::FUNCTION; 6307 return code()->kind() == Code::FUNCTION;
6312 } 6308 }
6313 6309
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after
8485 #undef WRITE_INT64_FIELD 8481 #undef WRITE_INT64_FIELD
8486 #undef READ_BYTE_FIELD 8482 #undef READ_BYTE_FIELD
8487 #undef WRITE_BYTE_FIELD 8483 #undef WRITE_BYTE_FIELD
8488 #undef NOBARRIER_READ_BYTE_FIELD 8484 #undef NOBARRIER_READ_BYTE_FIELD
8489 #undef NOBARRIER_WRITE_BYTE_FIELD 8485 #undef NOBARRIER_WRITE_BYTE_FIELD
8490 8486
8491 } // namespace internal 8487 } // namespace internal
8492 } // namespace v8 8488 } // namespace v8
8493 8489
8494 #endif // V8_OBJECTS_INL_H_ 8490 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/parsing/parse-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698