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

Side by Side Diff: src/runtime.cc

Issue 346223007: Do not eagerly update allow_osr_at_loop_nesting_level. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 8512 matching lines...) Expand 10 before | Expand all | Expand 10 after
8523 !function->IsInOptimizationQueue()) { 8523 !function->IsInOptimizationQueue()) {
8524 return isolate->heap()->undefined_value(); 8524 return isolate->heap()->undefined_value();
8525 } 8525 }
8526 8526
8527 function->MarkForOptimization(); 8527 function->MarkForOptimization();
8528 8528
8529 Code* unoptimized = function->shared()->code(); 8529 Code* unoptimized = function->shared()->code();
8530 if (args.length() == 2 && 8530 if (args.length() == 2 &&
8531 unoptimized->kind() == Code::FUNCTION) { 8531 unoptimized->kind() == Code::FUNCTION) {
8532 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); 8532 CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
8533 if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("osr"))) { 8533 if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("osr")) && FLAG_use_osr) {
8534 // Start patching from the currently patched loop nesting level. 8534 // Start patching from the currently patched loop nesting level.
8535 int current_level = unoptimized->allow_osr_at_loop_nesting_level(); 8535 ASSERT(BackEdgeTable::Verify(isolate, unoptimized));
8536 ASSERT(BackEdgeTable::Verify(isolate, unoptimized, current_level)); 8536 isolate->runtime_profiler()->AttemptOnStackReplacement(
8537 if (FLAG_use_osr) { 8537 *function, Code::kMaxLoopNestingMarker);
8538 for (int i = current_level + 1; i <= Code::kMaxLoopNestingMarker; i++) {
8539 unoptimized->set_allow_osr_at_loop_nesting_level(i);
8540 isolate->runtime_profiler()->AttemptOnStackReplacement(*function);
8541 }
8542 }
8543 } else if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("concurrent")) && 8538 } else if (type->IsOneByteEqualTo(STATIC_ASCII_VECTOR("concurrent")) &&
8544 isolate->concurrent_recompilation_enabled()) { 8539 isolate->concurrent_recompilation_enabled()) {
8545 function->MarkForConcurrentOptimization(); 8540 function->MarkForConcurrentOptimization();
8546 } 8541 }
8547 } 8542 }
8548 8543
8549 return isolate->heap()->undefined_value(); 8544 return isolate->heap()->undefined_value();
8550 } 8545 }
8551 8546
8552 8547
(...skipping 6556 matching lines...) Expand 10 before | Expand all | Expand 10 after
15109 } 15104 }
15110 return NULL; 15105 return NULL;
15111 } 15106 }
15112 15107
15113 15108
15114 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15109 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15115 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15110 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15116 } 15111 }
15117 15112
15118 } } // namespace v8::internal 15113 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698