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

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: addressed comments 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
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/objects.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 // 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 4481 matching lines...) Expand 10 before | Expand all | Expand 10 after
4492 // [safepoint_table_start]: For kind OPTIMIZED_CODE, the offset in 4492 // [safepoint_table_start]: For kind OPTIMIZED_CODE, the offset in
4493 // the instruction stream where the safepoint table starts. 4493 // the instruction stream where the safepoint table starts.
4494 inline unsigned safepoint_table_offset(); 4494 inline unsigned safepoint_table_offset();
4495 inline void set_safepoint_table_offset(unsigned offset); 4495 inline void set_safepoint_table_offset(unsigned offset);
4496 4496
4497 // [stack_check_table_start]: For kind FUNCTION, the offset in the 4497 // [stack_check_table_start]: For kind FUNCTION, the offset in the
4498 // instruction stream where the stack check table starts. 4498 // instruction stream where the stack check table starts.
4499 inline unsigned stack_check_table_offset(); 4499 inline unsigned stack_check_table_offset();
4500 inline void set_stack_check_table_offset(unsigned offset); 4500 inline void set_stack_check_table_offset(unsigned offset);
4501 4501
4502 inline bool stack_check_patched_for_osr();
4503 inline void set_stack_check_patched_for_osr(bool value);
4504
4502 // [check type]: For kind CALL_IC, tells how to check if the 4505 // [check type]: For kind CALL_IC, tells how to check if the
4503 // receiver is valid for the given call. 4506 // receiver is valid for the given call.
4504 inline CheckType check_type(); 4507 inline CheckType check_type();
4505 inline void set_check_type(CheckType value); 4508 inline void set_check_type(CheckType value);
4506 4509
4507 // [type-recording unary op type]: For kind UNARY_OP_IC. 4510 // [type-recording unary op type]: For kind UNARY_OP_IC.
4508 inline byte unary_op_type(); 4511 inline byte unary_op_type();
4509 inline void set_unary_op_type(byte value); 4512 inline void set_unary_op_type(byte value);
4510 4513
4511 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4514 // [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
4769 kSafepointTableOffsetBitCount <= 32); 4772 kSafepointTableOffsetBitCount <= 32);
4770 4773
4771 class SafepointTableOffsetField: public BitField<int, 4774 class SafepointTableOffsetField: public BitField<int,
4772 kSafepointTableOffsetFirstBit, 4775 kSafepointTableOffsetFirstBit,
4773 kSafepointTableOffsetBitCount> {}; // NOLINT 4776 kSafepointTableOffsetBitCount> {}; // NOLINT
4774 class StubMajorKeyField: public BitField<int, 4777 class StubMajorKeyField: public BitField<int,
4775 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT 4778 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
4776 4779
4777 // KindSpecificFlags2 layout (FUNCTION) 4780 // KindSpecificFlags2 layout (FUNCTION)
4778 class StackCheckTableOffsetField: public BitField<int, 0, 31> {}; 4781 class StackCheckTableOffsetField: public BitField<int, 0, 31> {};
4782 class StackCheckPatchedForOSRField: public BitField<bool, 31, 1> {};
4779 4783
4780 // Signed field cannot be encoded using the BitField class. 4784 // Signed field cannot be encoded using the BitField class.
4781 static const int kArgumentsCountShift = 17; 4785 static const int kArgumentsCountShift = 17;
4782 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); 4786 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
4783 4787
4784 // This constant should be encodable in an ARM instruction. 4788 // This constant should be encodable in an ARM instruction.
4785 static const int kFlagsNotUsedInLookup = 4789 static const int kFlagsNotUsedInLookup =
4786 TypeField::kMask | CacheHolderField::kMask; 4790 TypeField::kMask | CacheHolderField::kMask;
4787 4791
4788 private: 4792 private:
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
6131 6135
6132 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); 6136 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
6133 6137
6134 typedef FixedBodyDescriptor<kNameOffset, 6138 typedef FixedBodyDescriptor<kNameOffset,
6135 kThisPropertyAssignmentsOffset + kPointerSize, 6139 kThisPropertyAssignmentsOffset + kPointerSize,
6136 kSize> BodyDescriptor; 6140 kSize> BodyDescriptor;
6137 6141
6138 // Bit positions in start_position_and_type. 6142 // Bit positions in start_position_and_type.
6139 // The source code start position is in the 30 most significant bits of 6143 // The source code start position is in the 30 most significant bits of
6140 // the start_position_and_type field. 6144 // the start_position_and_type field.
6141 static const int kIsExpressionBit = 0; 6145 static const int kIsExpressionBit = 0;
6142 static const int kIsTopLevelBit = 1; 6146 static const int kIsTopLevelBit = 1;
6143 static const int kStartPositionShift = 2; 6147 static const int kStartPositionShift = 2;
6144 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 6148 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
6145 6149
6146 // Bit positions in compiler_hints. 6150 // Bit positions in compiler_hints.
6147 static const int kCodeAgeSize = 3; 6151 static const int kCodeAgeSize = 3;
6148 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1; 6152 static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
6149 6153
6150 enum CompilerHints { 6154 enum CompilerHints {
6151 kHasOnlySimpleThisPropertyAssignments, 6155 kHasOnlySimpleThisPropertyAssignments,
6152 kAllowLazyCompilation, 6156 kAllowLazyCompilation,
6153 kAllowLazyCompilationWithoutContext, 6157 kAllowLazyCompilationWithoutContext,
6154 kLiveObjectsMayExist, 6158 kLiveObjectsMayExist,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 inline Context* context(); 6272 inline Context* context();
6269 inline Object* unchecked_context(); 6273 inline Object* unchecked_context();
6270 inline void set_context(Object* context); 6274 inline void set_context(Object* context);
6271 6275
6272 // [code]: The generated code object for this function. Executed 6276 // [code]: The generated code object for this function. Executed
6273 // when the function is invoked, e.g. foo() or new foo(). See 6277 // when the function is invoked, e.g. foo() or new foo(). See
6274 // [[Call]] and [[Construct]] description in ECMA-262, section 6278 // [[Call]] and [[Construct]] description in ECMA-262, section
6275 // 8.6.2, page 27. 6279 // 8.6.2, page 27.
6276 inline Code* code(); 6280 inline Code* code();
6277 inline void set_code(Code* code); 6281 inline void set_code(Code* code);
6282 inline void set_code_no_write_barrier(Code* code);
6278 inline void ReplaceCode(Code* code); 6283 inline void ReplaceCode(Code* code);
6279 6284
6280 inline Code* unchecked_code(); 6285 inline Code* unchecked_code();
6281 6286
6282 // Tells whether this function is builtin. 6287 // Tells whether this function is builtin.
6283 inline bool IsBuiltin(); 6288 inline bool IsBuiltin();
6284 6289
6285 // Tells whether or not the function needs arguments adaption. 6290 // Tells whether or not the function needs arguments adaption.
6286 inline bool NeedsArgumentsAdaption(); 6291 inline bool NeedsArgumentsAdaption();
6287 6292
6288 // Tells whether or not this function has been optimized. 6293 // Tells whether or not this function has been optimized.
6289 inline bool IsOptimized(); 6294 inline bool IsOptimized();
6290 6295
6291 // Tells whether or not this function can be optimized. 6296 // Tells whether or not this function can be optimized.
6292 inline bool IsOptimizable(); 6297 inline bool IsOptimizable();
6293 6298
6294 // Mark this function for lazy recompilation. The function will be 6299 // Mark this function for lazy recompilation. The function will be
6295 // recompiled the next time it is executed. 6300 // recompiled the next time it is executed.
6296 void MarkForLazyRecompilation(); 6301 void MarkForLazyRecompilation();
6297 void MarkForParallelRecompilation(); 6302 void MarkForParallelRecompilation();
6303 void MarkForInstallingRecompiledCode();
6304 void MarkInRecompileQueue();
6298 6305
6299 // Helpers to compile this function. Returns true on success, false on 6306 // Helpers to compile this function. Returns true on success, false on
6300 // failure (e.g., stack overflow during compilation). 6307 // failure (e.g., stack overflow during compilation).
6301 static bool EnsureCompiled(Handle<JSFunction> function, 6308 static bool EnsureCompiled(Handle<JSFunction> function,
6302 ClearExceptionFlag flag); 6309 ClearExceptionFlag flag);
6303 static bool CompileLazy(Handle<JSFunction> function, 6310 static bool CompileLazy(Handle<JSFunction> function,
6304 ClearExceptionFlag flag); 6311 ClearExceptionFlag flag);
6305 static bool CompileOptimized(Handle<JSFunction> function, 6312 static bool CompileOptimized(Handle<JSFunction> function,
6306 BailoutId osr_ast_id, 6313 BailoutId osr_ast_id,
6307 ClearExceptionFlag flag); 6314 ClearExceptionFlag flag);
6308 6315
6309 // Tells whether or not the function is already marked for lazy 6316 // Tells whether or not the function is already marked for lazy
6310 // recompilation. 6317 // recompilation.
6311 inline bool IsMarkedForLazyRecompilation(); 6318 inline bool IsMarkedForLazyRecompilation();
6312 inline bool IsMarkedForParallelRecompilation(); 6319 inline bool IsMarkedForParallelRecompilation();
6320 inline bool IsMarkedForInstallingRecompiledCode();
6313 6321
6314 // Tells whether or not the function is on the parallel 6322 // Tells whether or not the function is on the parallel
6315 // recompilation queue. 6323 // recompilation queue.
6316 inline bool IsInRecompileQueue(); 6324 inline bool IsInRecompileQueue();
6317 6325
6318 // Check whether or not this function is inlineable. 6326 // Check whether or not this function is inlineable.
6319 bool IsInlineable(); 6327 bool IsInlineable();
6320 6328
6321 // [literals_or_bindings]: Fixed array holding either 6329 // [literals_or_bindings]: Fixed array holding either
6322 // the materialized literals or the bindings of a bound function. 6330 // the materialized literals or the bindings of a bound function.
(...skipping 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
9256 } else { 9264 } else {
9257 value &= ~(1 << bit_position); 9265 value &= ~(1 << bit_position);
9258 } 9266 }
9259 return value; 9267 return value;
9260 } 9268 }
9261 }; 9269 };
9262 9270
9263 } } // namespace v8::internal 9271 } } // namespace v8::internal
9264 9272
9265 #endif // V8_OBJECTS_H_ 9273 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698