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

Side by Side Diff: src/objects.h

Issue 19383002: Make deoptimization stress count global. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/objects-inl.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 // 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 6139 matching lines...) Expand 10 before | Expand all | Expand 10 after
6150 DECL_BOOLEAN_ACCESSORS(is_toplevel) 6150 DECL_BOOLEAN_ACCESSORS(is_toplevel)
6151 6151
6152 // Bit field containing various information collected by the compiler to 6152 // Bit field containing various information collected by the compiler to
6153 // drive optimization. 6153 // drive optimization.
6154 inline int compiler_hints(); 6154 inline int compiler_hints();
6155 inline void set_compiler_hints(int value); 6155 inline void set_compiler_hints(int value);
6156 6156
6157 inline int ast_node_count(); 6157 inline int ast_node_count();
6158 inline void set_ast_node_count(int count); 6158 inline void set_ast_node_count(int count);
6159 6159
6160 // A counter used to determine when to stress the deoptimizer with a
6161 // deopt.
6162 inline int stress_deopt_counter();
6163 inline void set_stress_deopt_counter(int counter);
6164
6165 inline int profiler_ticks(); 6160 inline int profiler_ticks();
6166 6161
6167 // Inline cache age is used to infer whether the function survived a context 6162 // Inline cache age is used to infer whether the function survived a context
6168 // disposal or not. In the former case we reset the opt_count. 6163 // disposal or not. In the former case we reset the opt_count.
6169 inline int ic_age(); 6164 inline int ic_age();
6170 inline void set_ic_age(int age); 6165 inline void set_ic_age(int age);
6171 6166
6172 // Indicates if this function can be lazy compiled. 6167 // Indicates if this function can be lazy compiled.
6173 // This is used to determine if we can safely flush code from a function 6168 // This is used to determine if we can safely flush code from a function
6174 // when doing GC if we expect that the function will no longer be used. 6169 // when doing GC if we expect that the function will no longer be used.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
6346 static const int kStartPositionAndTypeOffset = 6341 static const int kStartPositionAndTypeOffset =
6347 kNumLiteralsOffset + kPointerSize; 6342 kNumLiteralsOffset + kPointerSize;
6348 static const int kEndPositionOffset = 6343 static const int kEndPositionOffset =
6349 kStartPositionAndTypeOffset + kPointerSize; 6344 kStartPositionAndTypeOffset + kPointerSize;
6350 static const int kFunctionTokenPositionOffset = 6345 static const int kFunctionTokenPositionOffset =
6351 kEndPositionOffset + kPointerSize; 6346 kEndPositionOffset + kPointerSize;
6352 static const int kCompilerHintsOffset = 6347 static const int kCompilerHintsOffset =
6353 kFunctionTokenPositionOffset + kPointerSize; 6348 kFunctionTokenPositionOffset + kPointerSize;
6354 static const int kOptCountOffset = kCompilerHintsOffset + kPointerSize; 6349 static const int kOptCountOffset = kCompilerHintsOffset + kPointerSize;
6355 static const int kCountersOffset = kOptCountOffset + kPointerSize; 6350 static const int kCountersOffset = kOptCountOffset + kPointerSize;
6356 static const int kStressDeoptCounterOffset = kCountersOffset + kPointerSize;
6357 6351
6358 // Total size. 6352 // Total size.
6359 static const int kSize = kStressDeoptCounterOffset + kPointerSize; 6353 static const int kSize = kCountersOffset + kPointerSize;
6360 #else 6354 #else
6361 // The only reason to use smi fields instead of int fields 6355 // The only reason to use smi fields instead of int fields
6362 // is to allow iteration without maps decoding during 6356 // is to allow iteration without maps decoding during
6363 // garbage collections. 6357 // garbage collections.
6364 // To avoid wasting space on 64-bit architectures we use 6358 // To avoid wasting space on 64-bit architectures we use
6365 // the following trick: we group integer fields into pairs 6359 // the following trick: we group integer fields into pairs
6366 // First integer in each pair is shifted left by 1. 6360 // First integer in each pair is shifted left by 1.
6367 // By doing this we guarantee that LSB of each kPointerSize aligned 6361 // By doing this we guarantee that LSB of each kPointerSize aligned
6368 // word is not set and thus this word cannot be treated as pointer 6362 // word is not set and thus this word cannot be treated as pointer
6369 // to HeapObject during old space traversal. 6363 // to HeapObject during old space traversal.
(...skipping 13 matching lines...) Expand all
6383 kEndPositionOffset + kIntSize; 6377 kEndPositionOffset + kIntSize;
6384 6378
6385 static const int kFunctionTokenPositionOffset = 6379 static const int kFunctionTokenPositionOffset =
6386 kStartPositionAndTypeOffset + kIntSize; 6380 kStartPositionAndTypeOffset + kIntSize;
6387 static const int kCompilerHintsOffset = 6381 static const int kCompilerHintsOffset =
6388 kFunctionTokenPositionOffset + kIntSize; 6382 kFunctionTokenPositionOffset + kIntSize;
6389 6383
6390 static const int kOptCountOffset = kCompilerHintsOffset + kIntSize; 6384 static const int kOptCountOffset = kCompilerHintsOffset + kIntSize;
6391 6385
6392 static const int kCountersOffset = kOptCountOffset + kIntSize; 6386 static const int kCountersOffset = kOptCountOffset + kIntSize;
6393 static const int kStressDeoptCounterOffset = kCountersOffset + kIntSize;
6394 6387
6395 // Total size. 6388 // Total size.
6396 static const int kSize = kStressDeoptCounterOffset + kIntSize; 6389 static const int kSize = kCountersOffset + kIntSize;
6397 6390
6398 #endif 6391 #endif
6399 6392
6400 // The construction counter for inobject slack tracking is stored in the 6393 // The construction counter for inobject slack tracking is stored in the
6401 // most significant byte of compiler_hints which is otherwise unused. 6394 // most significant byte of compiler_hints which is otherwise unused.
6402 // Its offset depends on the endian-ness of the architecture. 6395 // Its offset depends on the endian-ness of the architecture.
6403 #if __BYTE_ORDER == __LITTLE_ENDIAN 6396 #if __BYTE_ORDER == __LITTLE_ENDIAN
6404 static const int kConstructionCountOffset = kCompilerHintsOffset + 3; 6397 static const int kConstructionCountOffset = kCompilerHintsOffset + 3;
6405 #elif __BYTE_ORDER == __BIG_ENDIAN 6398 #elif __BYTE_ORDER == __BIG_ENDIAN
6406 static const int kConstructionCountOffset = kCompilerHintsOffset + 0; 6399 static const int kConstructionCountOffset = kCompilerHintsOffset + 0;
(...skipping 3432 matching lines...) Expand 10 before | Expand all | Expand 10 after
9839 } else { 9832 } else {
9840 value &= ~(1 << bit_position); 9833 value &= ~(1 << bit_position);
9841 } 9834 }
9842 return value; 9835 return value;
9843 } 9836 }
9844 }; 9837 };
9845 9838
9846 } } // namespace v8::internal 9839 } } // namespace v8::internal
9847 9840
9848 #endif // V8_OBJECTS_H_ 9841 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698