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

Side by Side Diff: src/deoptimizer.h

Issue 11636046: Refactored deopt tracing and FindOptimizedCode. Fixed a bug when printing stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/deoptimizer.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 public: 137 public:
138 enum BailoutType { 138 enum BailoutType {
139 EAGER, 139 EAGER,
140 LAZY, 140 LAZY,
141 OSR, 141 OSR,
142 // This last bailout type is not really a bailout, but used by the 142 // This last bailout type is not really a bailout, but used by the
143 // debugger to deoptimize stack frames to allow inspection. 143 // debugger to deoptimize stack frames to allow inspection.
144 DEBUGGER 144 DEBUGGER
145 }; 145 };
146 146
147 static bool TraceEnabledFor(BailoutType type);
148 static const char* MessageFor(BailoutType type);
149
147 int output_count() const { return output_count_; } 150 int output_count() const { return output_count_; }
148 151
149 Code::Kind compiled_code_kind() const { return compiled_code_->kind(); } 152 Code::Kind compiled_code_kind() const { return compiled_code_->kind(); }
150 153
151 // Number of created JS frames. Not all created frames are necessarily JS. 154 // Number of created JS frames. Not all created frames are necessarily JS.
152 int jsframe_count() const { return jsframe_count_; } 155 int jsframe_count() const { return jsframe_count_; }
153 156
154 static Deoptimizer* New(JSFunction* function, 157 static Deoptimizer* New(JSFunction* function,
155 BailoutType type, 158 BailoutType type,
156 unsigned bailout_id, 159 unsigned bailout_id,
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 static const int kMinNumberOfEntries = 64; 322 static const int kMinNumberOfEntries = 64;
320 static const int kMaxNumberOfEntries = 16384; 323 static const int kMaxNumberOfEntries = 16384;
321 324
322 Deoptimizer(Isolate* isolate, 325 Deoptimizer(Isolate* isolate,
323 JSFunction* function, 326 JSFunction* function,
324 BailoutType type, 327 BailoutType type,
325 unsigned bailout_id, 328 unsigned bailout_id,
326 Address from, 329 Address from,
327 int fp_to_sp_delta, 330 int fp_to_sp_delta,
328 Code* optimized_code); 331 Code* optimized_code);
332 Code* FindOptimizedCode(JSFunction* function, Code* optimized_code);
333 void Trace();
334 void PrintFunctionName();
329 void DeleteFrameDescriptions(); 335 void DeleteFrameDescriptions();
330 336
331 void DoComputeOutputFrames(); 337 void DoComputeOutputFrames();
332 void DoComputeOsrOutputFrame(); 338 void DoComputeOsrOutputFrame();
333 void DoComputeJSFrame(TranslationIterator* iterator, int frame_index); 339 void DoComputeJSFrame(TranslationIterator* iterator, int frame_index);
334 void DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator, 340 void DoComputeArgumentsAdaptorFrame(TranslationIterator* iterator,
335 int frame_index); 341 int frame_index);
336 void DoComputeConstructStubFrame(TranslationIterator* iterator, 342 void DoComputeConstructStubFrame(TranslationIterator* iterator,
337 int frame_index); 343 int frame_index);
338 void DoComputeAccessorStubFrame(TranslationIterator* iterator, 344 void DoComputeAccessorStubFrame(TranslationIterator* iterator,
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 Object** expression_stack_; 874 Object** expression_stack_;
869 int source_position_; 875 int source_position_;
870 876
871 friend class Deoptimizer; 877 friend class Deoptimizer;
872 }; 878 };
873 #endif 879 #endif
874 880
875 } } // namespace v8::internal 881 } } // namespace v8::internal
876 882
877 #endif // V8_DEOPTIMIZER_H_ 883 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698