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

Side by Side Diff: src/runtime.cc

Issue 544213002: Fix more fallout from making OptimizeFunctionOnNextCall work as advertised. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/compiler.cc ('k') | test/mjsunit/compiler/regress-411262.js » ('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 8459 matching lines...) Expand 10 before | Expand all | Expand 10 after
8470 function->ReplaceCode(*unoptimized); 8470 function->ReplaceCode(*unoptimized);
8471 return function->code(); 8471 return function->code();
8472 } 8472 }
8473 8473
8474 Compiler::ConcurrencyMode mode = 8474 Compiler::ConcurrencyMode mode =
8475 concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT; 8475 concurrent ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT;
8476 Handle<Code> code; 8476 Handle<Code> code;
8477 if (Compiler::GetOptimizedCode(function, unoptimized, mode).ToHandle(&code)) { 8477 if (Compiler::GetOptimizedCode(function, unoptimized, mode).ToHandle(&code)) {
8478 function->ReplaceCode(*code); 8478 function->ReplaceCode(*code);
8479 } else { 8479 } else {
8480 function->ReplaceCode(*unoptimized); 8480 function->ReplaceCode(function->shared()->code());
8481 } 8481 }
8482 8482
8483 DCHECK(function->code()->kind() == Code::FUNCTION || 8483 DCHECK(function->code()->kind() == Code::FUNCTION ||
8484 function->code()->kind() == Code::OPTIMIZED_FUNCTION || 8484 function->code()->kind() == Code::OPTIMIZED_FUNCTION ||
8485 function->IsInOptimizationQueue()); 8485 function->IsInOptimizationQueue());
8486 return function->code(); 8486 return function->code();
8487 } 8487 }
8488 8488
8489 8489
8490 class ActivationsFinder : public ThreadVisitor { 8490 class ActivationsFinder : public ThreadVisitor {
(...skipping 7149 matching lines...) Expand 10 before | Expand all | Expand 10 after
15640 } 15640 }
15641 return NULL; 15641 return NULL;
15642 } 15642 }
15643 15643
15644 15644
15645 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15645 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15646 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15646 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15647 } 15647 }
15648 15648
15649 } } // namespace v8::internal 15649 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | test/mjsunit/compiler/regress-411262.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698