diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-08-12 10:11:03 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-08-12 10:11:03 -0700 |
commit | 083ee0f8b7a8d98d51bf2debf47d68117f13087f (patch) | |
tree | a82e78989562eaf41da7963fe0c80d8f1af94c6d /deps/v8/src/handles.cc | |
parent | 9acd76ed6e020fa540f64eabf4bdb33513795924 (diff) | |
download | node-new-083ee0f8b7a8d98d51bf2debf47d68117f13087f.tar.gz |
Upgrade V8 to 2.3.7
Diffstat (limited to 'deps/v8/src/handles.cc')
-rw-r--r-- | deps/v8/src/handles.cc | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/deps/v8/src/handles.cc b/deps/v8/src/handles.cc index 0d218cb972..927cfd9128 100644 --- a/deps/v8/src/handles.cc +++ b/deps/v8/src/handles.cc @@ -771,20 +771,30 @@ bool CompileLazyShared(Handle<SharedFunctionInfo> shared, bool CompileLazy(Handle<JSFunction> function, Handle<Object> receiver, ClearExceptionFlag flag) { - CompilationInfo info(function, 0, receiver); - bool result = CompileLazyHelper(&info, flag); - PROFILE(FunctionCreateEvent(*function)); - return result; + if (function->shared()->is_compiled()) { + function->set_code(function->shared()->code()); + return true; + } else { + CompilationInfo info(function, 0, receiver); + bool result = CompileLazyHelper(&info, flag); + PROFILE(FunctionCreateEvent(*function)); + return result; + } } bool CompileLazyInLoop(Handle<JSFunction> function, Handle<Object> receiver, ClearExceptionFlag flag) { - CompilationInfo info(function, 1, receiver); - bool result = CompileLazyHelper(&info, flag); - PROFILE(FunctionCreateEvent(*function)); - return result; + if (function->shared()->is_compiled()) { + function->set_code(function->shared()->code()); + return true; + } else { + CompilationInfo info(function, 1, receiver); + bool result = CompileLazyHelper(&info, flag); + PROFILE(FunctionCreateEvent(*function)); + return result; + } } |