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

Unified Diff: src/accessors.cc

Issue 110203002: Refactor the compiling pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: move some code 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') | src/arm/builtins-arm.cc » ('J')
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..8cc791080742f80b876105aea984fe7f6f3cb879 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,11 +649,11 @@ 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)) {
titzer 2013/12/09 14:49:28 Not sure why you negated this condition, can you s
Yang 2013/12/10 11:22:04 Done.
+ return Failure::Exception();
}
- return Failure::Exception();
+ return Smi::FromInt(function_handle->shared()->length());
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/arm/builtins-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698