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

Side by Side Diff: src/compiler.h

Issue 22832002: Consistently use CompilationInfo::AbortOptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | src/compiler.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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return SupportsDeoptimization::decode(flags_); 228 return SupportsDeoptimization::decode(flags_);
229 } 229 }
230 void EnableDeoptimizationSupport() { 230 void EnableDeoptimizationSupport() {
231 ASSERT(IsOptimizable()); 231 ASSERT(IsOptimizable());
232 flags_ |= SupportsDeoptimization::encode(true); 232 flags_ |= SupportsDeoptimization::encode(true);
233 } 233 }
234 234
235 // Determines whether or not to insert a self-optimization header. 235 // Determines whether or not to insert a self-optimization header.
236 bool ShouldSelfOptimize(); 236 bool ShouldSelfOptimize();
237 237
238 // Disable all optimization attempts of this info for the rest of the 238 // Reset code to the unoptimized version when optimization is aborted.
239 // current compilation pipeline. 239 void AbortOptimization() {
240 void AbortOptimization(); 240 SetCode(handle(shared_info()->code()));
241 }
241 242
242 void set_deferred_handles(DeferredHandles* deferred_handles) { 243 void set_deferred_handles(DeferredHandles* deferred_handles) {
243 ASSERT(deferred_handles_ == NULL); 244 ASSERT(deferred_handles_ == NULL);
244 deferred_handles_ = deferred_handles; 245 deferred_handles_ = deferred_handles;
245 } 246 }
246 247
247 ZoneList<Handle<HeapObject> >* dependencies( 248 ZoneList<Handle<HeapObject> >* dependencies(
248 DependentCode::DependencyGroup group) { 249 DependentCode::DependencyGroup group) {
249 if (dependencies_[group] == NULL) { 250 if (dependencies_[group] == NULL) {
250 dependencies_[group] = new(zone_) ZoneList<Handle<HeapObject> >(2, zone_); 251 dependencies_[group] = new(zone_) ZoneList<Handle<HeapObject> >(2, zone_);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 unsigned info_zone_start_allocation_size_; 642 unsigned info_zone_start_allocation_size_;
642 int64_t start_ticks_; 643 int64_t start_ticks_;
643 644
644 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 645 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
645 }; 646 };
646 647
647 648
648 } } // namespace v8::internal 649 } } // namespace v8::internal
649 650
650 #endif // V8_COMPILER_H_ 651 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698