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

Unified Diff: src/accessors.cc

Issue 110203002: Refactor the compiling pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 4da9dd44ffeca52f50bb983f596dd99ee8136f5d..ba84c9a430cdb837e72947b021166d68f59164a4 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -28,6 +28,7 @@
#include "v8.h"
#include "accessors.h"
+#include "compiler.h"
#include "contexts.h"
#include "deoptimizer.h"
#include "execution.h"
@@ -648,9 +649,9 @@ MaybeObject* Accessors::FunctionGetLength(Isolate* isolate,
// If the function isn't compiled yet, the length is not computed correctly
// yet. Compile it now and return the right length.
HandleScope scope(isolate);
- Handle<JSFunction> handle(function);
- if (JSFunction::CompileLazy(handle, KEEP_EXCEPTION)) {
- return Smi::FromInt(handle->shared()->length());
+ Handle<JSFunction> function_handle(function);
+ if (Compiler::EnsureCompiled(function_handle, KEEP_EXCEPTION)) {
+ return Smi::FromInt(function_handle->shared()->length());
}
return Failure::Exception();
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698