From: yangguo@chromium.org Date: Mon, 23 Dec 2013 14:30:35 +0000 (+0000) Subject: Refactor the compiling pipeline. X-Git-Tag: upstream/4.7.83~11298 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a4be7067c7c0aad8da8632c016058c2032a43eb;p=platform%2Fupstream%2Fv8.git Refactor the compiling pipeline. Goals: - easier to read, more suitable identifiers. - better distinction between compiling optimized/unoptimized code - compiler does not install code on the function. - easier to add features (e.g. caching optimized code for osr). - remove unnecessary code. R=titzer@chromium.org Review URL: https://codereview.chromium.org/110203002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/accessors.cc b/src/accessors.cc index 4da9dd4..ba84c9a 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 handle(function); - if (JSFunction::CompileLazy(handle, KEEP_EXCEPTION)) { - return Smi::FromInt(handle->shared()->length()); + Handle function_handle(function); + if (Compiler::EnsureCompiled(function_handle, KEEP_EXCEPTION)) { + return Smi::FromInt(function_handle->shared()->length()); } return Failure::Exception(); } diff --git a/src/api.cc b/src/api.cc index 640c01b..c5023f8 100644 --- a/src/api.cc +++ b/src/api.cc @@ -1720,16 +1720,16 @@ Local