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

Side by Side Diff: src/lithium-codegen.cc

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion Created 6 years, 2 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/lithium-codegen.h ('k') | src/log.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/lithium-codegen.h" 7 #include "src/lithium-codegen.h"
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/ia32/lithium-ia32.h" // NOLINT 10 #include "src/ia32/lithium-ia32.h" // NOLINT
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 for (int i = 0; i < objects.length(); i++) { 219 for (int i = 0; i < objects.length(); i++) {
220 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); 220 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code);
221 } 221 }
222 for (int i = 0; i < cells.length(); i++) { 222 for (int i = 0; i < cells.length(); i++) {
223 AddWeakObjectToCodeDependency(isolate(), cells.at(i), code); 223 AddWeakObjectToCodeDependency(isolate(), cells.at(i), code);
224 } 224 }
225 } 225 }
226 226
227 227
228 void LCodeGenBase::Abort(BailoutReason reason) { 228 void LCodeGenBase::Abort(BailoutReason reason) {
229 info()->set_bailout_reason(reason); 229 info()->AbortOptimization(reason);
230 status_ = ABORTED;
231 }
232
233
234 void LCodeGenBase::Retry(BailoutReason reason) {
235 info()->RetryOptimization(reason);
230 status_ = ABORTED; 236 status_ = ABORTED;
231 } 237 }
232 238
233 239
234 void LCodeGenBase::AddDeprecationDependency(Handle<Map> map) { 240 void LCodeGenBase::AddDeprecationDependency(Handle<Map> map) {
235 if (map->is_deprecated()) return Abort(kMapBecameDeprecated); 241 if (map->is_deprecated()) return Retry(kMapBecameDeprecated);
236 chunk_->AddDeprecationDependency(map); 242 chunk_->AddDeprecationDependency(map);
237 } 243 }
238 244
239 245
240 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { 246 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) {
241 if (!map->is_stable()) return Abort(kMapBecameUnstable); 247 if (!map->is_stable()) return Retry(kMapBecameUnstable);
242 chunk_->AddStabilityDependency(map); 248 chunk_->AddStabilityDependency(map);
243 } 249 }
244 250
245 } } // namespace v8::internal 251 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium-codegen.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698