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

Side by Side Diff: src/objects.h

Issue 12488006: Parallel recompilation: remove interrupt for code generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4485 // [safepoint_table_start]: For kind OPTIMIZED_CODE, the offset in 4485 // [safepoint_table_start]: For kind OPTIMIZED_CODE, the offset in
4486 // the instruction stream where the safepoint table starts. 4486 // the instruction stream where the safepoint table starts.
4487 inline unsigned safepoint_table_offset(); 4487 inline unsigned safepoint_table_offset();
4488 inline void set_safepoint_table_offset(unsigned offset); 4488 inline void set_safepoint_table_offset(unsigned offset);
4489 4489
4490 // [stack_check_table_start]: For kind FUNCTION, the offset in the 4490 // [stack_check_table_start]: For kind FUNCTION, the offset in the
4491 // instruction stream where the stack check table starts. 4491 // instruction stream where the stack check table starts.
4492 inline unsigned stack_check_table_offset(); 4492 inline unsigned stack_check_table_offset();
4493 inline void set_stack_check_table_offset(unsigned offset); 4493 inline void set_stack_check_table_offset(unsigned offset);
4494 4494
4495 inline bool stack_check_patched_for_osr();
4496 inline void set_stack_check_patched_for_osr(bool value);
4497
4495 // [check type]: For kind CALL_IC, tells how to check if the 4498 // [check type]: For kind CALL_IC, tells how to check if the
4496 // receiver is valid for the given call. 4499 // receiver is valid for the given call.
4497 inline CheckType check_type(); 4500 inline CheckType check_type();
4498 inline void set_check_type(CheckType value); 4501 inline void set_check_type(CheckType value);
4499 4502
4500 // [type-recording unary op type]: For kind UNARY_OP_IC. 4503 // [type-recording unary op type]: For kind UNARY_OP_IC.
4501 inline byte unary_op_type(); 4504 inline byte unary_op_type();
4502 inline void set_unary_op_type(byte value); 4505 inline void set_unary_op_type(byte value);
4503 4506
4504 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4507 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
4762 kSafepointTableOffsetBitCount <= 32); 4765 kSafepointTableOffsetBitCount <= 32);
4763 4766
4764 class SafepointTableOffsetField: public BitField<int, 4767 class SafepointTableOffsetField: public BitField<int,
4765 kSafepointTableOffsetFirstBit, 4768 kSafepointTableOffsetFirstBit,
4766 kSafepointTableOffsetBitCount> {}; // NOLINT 4769 kSafepointTableOffsetBitCount> {}; // NOLINT
4767 class StubMajorKeyField: public BitField<int, 4770 class StubMajorKeyField: public BitField<int,
4768 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT 4771 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
4769 4772
4770 // KindSpecificFlags2 layout (FUNCTION) 4773 // KindSpecificFlags2 layout (FUNCTION)
4771 class StackCheckTableOffsetField: public BitField<int, 0, 31> {}; 4774 class StackCheckTableOffsetField: public BitField<int, 0, 31> {};
4775 class StackCheckPatchedForOSRField: public BitField<bool, 31, 1> {};
4772 4776
4773 // Signed field cannot be encoded using the BitField class. 4777 // Signed field cannot be encoded using the BitField class.
4774 static const int kArgumentsCountShift = 17; 4778 static const int kArgumentsCountShift = 17;
4775 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); 4779 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
4776 4780
4777 // This constant should be encodable in an ARM instruction. 4781 // This constant should be encodable in an ARM instruction.
4778 static const int kFlagsNotUsedInLookup = 4782 static const int kFlagsNotUsedInLookup =
4779 TypeField::kMask | CacheHolderField::kMask; 4783 TypeField::kMask | CacheHolderField::kMask;
4780 4784
4781 private: 4785 private:
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
6124 6128
6125 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); 6129 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
6126 6130
6127 typedef FixedBodyDescriptor<kNameOffset, 6131 typedef FixedBodyDescriptor<kNameOffset,
6128 kThisPropertyAssignmentsOffset + kPointerSize, 6132 kThisPropertyAssignmentsOffset + kPointerSize,
6129 kSize> BodyDescriptor; 6133 kSize> BodyDescriptor;
6130 6134
6131 // Bit positions in start_position_and_type. 6135 // Bit positions in start_position_and_type.
6132 // The source code start position is in the 30 most significant bits of 6136 // The source code start position is in the 30 most significant bits of
6133 // the start_position_and_type field. 6137 // the start_position_and_type field.
6134 static const int kIsExpressionBit = 0; 6138 static const int kIsExpressionBit = 0;
6135 static const int kIsTopLevelBit = 1; 6139 static const int kIsTopLevelBit = 1;
6136 static const int kStartPositionShift = 2; 6140 static const int kStartPositionShift = 2;
6137 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 6141 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
6138 6142
6139 // Bit positions in compiler_hints. 6143 // Bit positions in compiler_hints.
6140 static const int kCodeAgeSize = 3; 6144 static const int kCodeAgeSize = 3;
6141 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1; 6145 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
6142 6146
6143 enum CompilerHints { 6147 enum CompilerHints {
6144 kHasOnlySimpleThisPropertyAssignments, 6148 kHasOnlySimpleThisPropertyAssignments,
6145 kAllowLazyCompilation, 6149 kAllowLazyCompilation,
6146 kAllowLazyCompilationWithoutContext, 6150 kAllowLazyCompilationWithoutContext,
6147 kLiveObjectsMayExist, 6151 kLiveObjectsMayExist,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6261 inline Context* context(); 6265 inline Context* context();
6262 inline Object* unchecked_context(); 6266 inline Object* unchecked_context();
6263 inline void set_context(Object* context); 6267 inline void set_context(Object* context);
6264 6268
6265 // [code]: The generated code object for this function. Executed 6269 // [code]: The generated code object for this function. Executed
6266 // when the function is invoked, e.g. foo() or new foo(). See 6270 // when the function is invoked, e.g. foo() or new foo(). See
6267 // [[Call]] and [[Construct]] description in ECMA-262, section 6271 // [[Call]] and [[Construct]] description in ECMA-262, section
6268 // 8.6.2, page 27. 6272 // 8.6.2, page 27.
6269 inline Code* code(); 6273 inline Code* code();
6270 inline void set_code(Code* code); 6274 inline void set_code(Code* code);
6275 inline void set_code_no_write_barrier(Code* code);
6271 inline void ReplaceCode(Code* code); 6276 inline void ReplaceCode(Code* code);
6272 6277
6273 inline Code* unchecked_code(); 6278 inline Code* unchecked_code();
6274 6279
6275 // Tells whether this function is builtin. 6280 // Tells whether this function is builtin.
6276 inline bool IsBuiltin(); 6281 inline bool IsBuiltin();
6277 6282
6278 // Tells whether or not the function needs arguments adaption. 6283 // Tells whether or not the function needs arguments adaption.
6279 inline bool NeedsArgumentsAdaption(); 6284 inline bool NeedsArgumentsAdaption();
6280 6285
6281 // Tells whether or not this function has been optimized. 6286 // Tells whether or not this function has been optimized.
6282 inline bool IsOptimized(); 6287 inline bool IsOptimized();
6283 6288
6284 // Tells whether or not this function can be optimized. 6289 // Tells whether or not this function can be optimized.
6285 inline bool IsOptimizable(); 6290 inline bool IsOptimizable();
6286 6291
6287 // Mark this function for lazy recompilation. The function will be 6292 // Mark this function for lazy recompilation. The function will be
6288 // recompiled the next time it is executed. 6293 // recompiled the next time it is executed.
6289 void MarkForLazyRecompilation(); 6294 void MarkForLazyRecompilation();
6290 void MarkForParallelRecompilation(); 6295 void MarkForParallelRecompilation();
6296 void MarkForInstallingRecompiledCode();
6297 void MarkInRecompileQueue();
6291 6298
6292 // Helpers to compile this function. Returns true on success, false on 6299 // Helpers to compile this function. Returns true on success, false on
6293 // failure (e.g., stack overflow during compilation). 6300 // failure (e.g., stack overflow during compilation).
6294 static bool EnsureCompiled(Handle<JSFunction> function, 6301 static bool EnsureCompiled(Handle<JSFunction> function,
6295 ClearExceptionFlag flag); 6302 ClearExceptionFlag flag);
6296 static bool CompileLazy(Handle<JSFunction> function, 6303 static bool CompileLazy(Handle<JSFunction> function,
6297 ClearExceptionFlag flag); 6304 ClearExceptionFlag flag);
6298 static bool CompileOptimized(Handle<JSFunction> function, 6305 static bool CompileOptimized(Handle<JSFunction> function,
6299 BailoutId osr_ast_id, 6306 BailoutId osr_ast_id,
6300 ClearExceptionFlag flag); 6307 ClearExceptionFlag flag);
6301 6308
6302 // Tells whether or not the function is already marked for lazy 6309 // Tells whether or not the function is already marked for lazy
6303 // recompilation. 6310 // recompilation.
6304 inline bool IsMarkedForLazyRecompilation(); 6311 inline bool IsMarkedForLazyRecompilation();
6305 inline bool IsMarkedForParallelRecompilation(); 6312 inline bool IsMarkedForParallelRecompilation();
6313 inline bool IsMarkedForInstallingRecompiledCode();
6306 6314
6307 // Tells whether or not the function is on the parallel 6315 // Tells whether or not the function is on the parallel
6308 // recompilation queue. 6316 // recompilation queue.
6309 inline bool IsInRecompileQueue(); 6317 inline bool IsInRecompileQueue();
6310 6318
6311 // Check whether or not this function is inlineable. 6319 // Check whether or not this function is inlineable.
6312 bool IsInlineable(); 6320 bool IsInlineable();
6313 6321
6314 // [literals_or_bindings]: Fixed array holding either 6322 // [literals_or_bindings]: Fixed array holding either
6315 // the materialized literals or the bindings of a bound function. 6323 // the materialized literals or the bindings of a bound function.
(...skipping 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after
9247 } else { 9255 } else {
9248 value &= ~(1 << bit_position); 9256 value &= ~(1 << bit_position);
9249 } 9257 }
9250 return value; 9258 return value;
9251 } 9259 }
9252 }; 9260 };
9253 9261
9254 } } // namespace v8::internal 9262 } } // namespace v8::internal
9255 9263
9256 #endif // V8_OBJECTS_H_ 9264 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698