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

Side by Side Diff: src/runtime.cc

Issue 547293004: Rename Runtime_CompileUnoptimized to Runtime_CompileLazy, because that is what it does. Split Compi… (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/runtime.h ('k') | src/x64/builtins-x64.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 // 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 8387 matching lines...) Expand 10 before | Expand all | Expand 10 after
8398 HandleScope scope(isolate); 8398 HandleScope scope(isolate);
8399 DCHECK(args.length() == 1); 8399 DCHECK(args.length() == 1);
8400 8400
8401 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 8401 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8402 function->CompleteInobjectSlackTracking(); 8402 function->CompleteInobjectSlackTracking();
8403 8403
8404 return isolate->heap()->undefined_value(); 8404 return isolate->heap()->undefined_value();
8405 } 8405 }
8406 8406
8407 8407
8408 RUNTIME_FUNCTION(Runtime_CompileUnoptimized) { 8408 RUNTIME_FUNCTION(Runtime_CompileLazy) {
8409 HandleScope scope(isolate); 8409 HandleScope scope(isolate);
8410 DCHECK(args.length() == 1); 8410 DCHECK(args.length() == 1);
8411 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 8411 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8412 #ifdef DEBUG 8412 #ifdef DEBUG
8413 if (FLAG_trace_lazy && !function->shared()->is_compiled()) { 8413 if (FLAG_trace_lazy && !function->shared()->is_compiled()) {
8414 PrintF("[unoptimized: "); 8414 PrintF("[unoptimized: ");
8415 function->PrintName(); 8415 function->PrintName();
8416 PrintF("]\n"); 8416 PrintF("]\n");
8417 } 8417 }
8418 #endif 8418 #endif
8419 8419
8420 // Compile the target function. 8420 // Compile the target function.
8421 DCHECK(function->shared()->allows_lazy_compilation()); 8421 DCHECK(function->shared()->allows_lazy_compilation());
8422 8422
8423 Handle<Code> code; 8423 Handle<Code> code;
8424 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, code, 8424 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, code,
8425 Compiler::GetUnoptimizedCode(function)); 8425 Compiler::GetLazyCode(function));
8426 function->ReplaceCode(*code); 8426 function->ReplaceCode(*code);
8427 8427
8428 // All done. Return the compiled code. 8428 // All done. Return the compiled code.
8429 DCHECK(function->is_compiled()); 8429 DCHECK(function->is_compiled());
8430 DCHECK(function->code()->kind() == Code::FUNCTION || 8430 DCHECK(function->code()->kind() == Code::FUNCTION ||
8431 (FLAG_always_opt && 8431 (FLAG_always_opt &&
8432 function->code()->kind() == Code::OPTIMIZED_FUNCTION)); 8432 function->code()->kind() == Code::OPTIMIZED_FUNCTION));
8433 return *code; 8433 return *code;
8434 } 8434 }
8435 8435
(...skipping 7220 matching lines...) Expand 10 before | Expand all | Expand 10 after
15656 } 15656 }
15657 return NULL; 15657 return NULL;
15658 } 15658 }
15659 15659
15660 15660
15661 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15661 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15662 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15662 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15663 } 15663 }
15664 15664
15665 } } // namespace v8::internal 15665 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698