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

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: addressed comments 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
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime-profiler.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 // 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 6573 matching lines...) Expand 10 before | Expand all | Expand 10 after
15126 } 15121 }
15127 return NULL; 15122 return NULL;
15128 } 15123 }
15129 15124
15130 15125
15131 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15126 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15132 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15127 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15133 } 15128 }
15134 15129
15135 } } // namespace v8::internal 15130 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698