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

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

Issue 1206263002: Revert of Reland "Keep a canonical list of shared function infos." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months 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/objects-printer.cc » ('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 5120 matching lines...) Expand 10 before | Expand all | Expand 10 after
5131 ACCESSORS(Script, id, Smi, kIdOffset) 5131 ACCESSORS(Script, id, Smi, kIdOffset)
5132 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset) 5132 ACCESSORS_TO_SMI(Script, line_offset, kLineOffsetOffset)
5133 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset) 5133 ACCESSORS_TO_SMI(Script, column_offset, kColumnOffsetOffset)
5134 ACCESSORS(Script, context_data, Object, kContextOffset) 5134 ACCESSORS(Script, context_data, Object, kContextOffset)
5135 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset) 5135 ACCESSORS(Script, wrapper, HeapObject, kWrapperOffset)
5136 ACCESSORS_TO_SMI(Script, type, kTypeOffset) 5136 ACCESSORS_TO_SMI(Script, type, kTypeOffset)
5137 ACCESSORS(Script, line_ends, Object, kLineEndsOffset) 5137 ACCESSORS(Script, line_ends, Object, kLineEndsOffset)
5138 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset) 5138 ACCESSORS(Script, eval_from_shared, Object, kEvalFromSharedOffset)
5139 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset, 5139 ACCESSORS_TO_SMI(Script, eval_from_instructions_offset,
5140 kEvalFrominstructionsOffsetOffset) 5140 kEvalFrominstructionsOffsetOffset)
5141 ACCESSORS(Script, shared_function_infos, Object, kSharedFunctionInfosOffset)
5142 ACCESSORS_TO_SMI(Script, flags, kFlagsOffset) 5141 ACCESSORS_TO_SMI(Script, flags, kFlagsOffset)
5143 ACCESSORS(Script, source_url, Object, kSourceUrlOffset) 5142 ACCESSORS(Script, source_url, Object, kSourceUrlOffset)
5144 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset) 5143 ACCESSORS(Script, source_mapping_url, Object, kSourceMappingUrlOffset)
5145 5144
5146 Script::CompilationType Script::compilation_type() { 5145 Script::CompilationType Script::compilation_type() {
5147 return BooleanBit::get(flags(), kCompilationTypeBit) ? 5146 return BooleanBit::get(flags(), kCompilationTypeBit) ?
5148 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST; 5147 COMPILATION_TYPE_EVAL : COMPILATION_TYPE_HOST;
5149 } 5148 }
5150 void Script::set_compilation_type(CompilationType type) { 5149 void Script::set_compilation_type(CompilationType type) {
5151 set_flags(BooleanBit::set(flags(), kCompilationTypeBit, 5150 set_flags(BooleanBit::set(flags(), kCompilationTypeBit,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
5226 BOOL_ACCESSORS(SharedFunctionInfo, 5225 BOOL_ACCESSORS(SharedFunctionInfo,
5227 compiler_hints, 5226 compiler_hints,
5228 uses_arguments, 5227 uses_arguments,
5229 kUsesArguments) 5228 kUsesArguments)
5230 BOOL_ACCESSORS(SharedFunctionInfo, 5229 BOOL_ACCESSORS(SharedFunctionInfo,
5231 compiler_hints, 5230 compiler_hints,
5232 has_duplicate_parameters, 5231 has_duplicate_parameters,
5233 kHasDuplicateParameters) 5232 kHasDuplicateParameters)
5234 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction) 5233 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, asm_function, kIsAsmFunction)
5235 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized) 5234 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, deserialized, kDeserialized)
5236 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, never_compiled,
5237 kNeverCompiled)
5238 5235
5239 5236
5240 #if V8_HOST_ARCH_32_BIT 5237 #if V8_HOST_ARCH_32_BIT
5241 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset) 5238 SMI_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
5242 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count, 5239 SMI_ACCESSORS(SharedFunctionInfo, internal_formal_parameter_count,
5243 kFormalParameterCountOffset) 5240 kFormalParameterCountOffset)
5244 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties, 5241 SMI_ACCESSORS(SharedFunctionInfo, expected_nof_properties,
5245 kExpectedNofPropertiesOffset) 5242 kExpectedNofPropertiesOffset)
5246 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) 5243 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset)
5247 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type, 5244 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type,
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
5442 // If the GC metadata field is already used then the function was 5439 // If the GC metadata field is already used then the function was
5443 // enqueued as a code flushing candidate and we remove it now. 5440 // enqueued as a code flushing candidate and we remove it now.
5444 if (code()->gc_metadata() != NULL) { 5441 if (code()->gc_metadata() != NULL) {
5445 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher(); 5442 CodeFlusher* flusher = GetHeap()->mark_compact_collector()->code_flusher();
5446 flusher->EvictCandidate(this); 5443 flusher->EvictCandidate(this);
5447 } 5444 }
5448 5445
5449 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL); 5446 DCHECK(code()->gc_metadata() == NULL && value->gc_metadata() == NULL);
5450 5447
5451 set_code(value); 5448 set_code(value);
5452
5453 if (is_compiled()) set_never_compiled(false);
5454 } 5449 }
5455 5450
5456 5451
5457 ScopeInfo* SharedFunctionInfo::scope_info() const { 5452 ScopeInfo* SharedFunctionInfo::scope_info() const {
5458 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset)); 5453 return reinterpret_cast<ScopeInfo*>(READ_FIELD(this, kScopeInfoOffset));
5459 } 5454 }
5460 5455
5461 5456
5462 void SharedFunctionInfo::set_scope_info(ScopeInfo* value, 5457 void SharedFunctionInfo::set_scope_info(ScopeInfo* value,
5463 WriteBarrierMode mode) { 5458 WriteBarrierMode mode) {
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
7291 #undef READ_SHORT_FIELD 7286 #undef READ_SHORT_FIELD
7292 #undef WRITE_SHORT_FIELD 7287 #undef WRITE_SHORT_FIELD
7293 #undef READ_BYTE_FIELD 7288 #undef READ_BYTE_FIELD
7294 #undef WRITE_BYTE_FIELD 7289 #undef WRITE_BYTE_FIELD
7295 #undef NOBARRIER_READ_BYTE_FIELD 7290 #undef NOBARRIER_READ_BYTE_FIELD
7296 #undef NOBARRIER_WRITE_BYTE_FIELD 7291 #undef NOBARRIER_WRITE_BYTE_FIELD
7297 7292
7298 } } // namespace v8::internal 7293 } } // namespace v8::internal
7299 7294
7300 #endif // V8_OBJECTS_INL_H_ 7295 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698