summaryrefslogtreecommitdiff
path: root/deps/v8/src/liveedit.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-09-16 21:33:32 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-09-16 21:33:32 -0700
commit431e43009c1a90781bea57aa993797d0161bbf95 (patch)
tree05f2a330d690365aee943d0bc1b5813070662c4b /deps/v8/src/liveedit.cc
parentd2de8ba400abf5fffe4ed9c688df86508ea72ff1 (diff)
downloadnode-431e43009c1a90781bea57aa993797d0161bbf95.tar.gz
Upgrade V8 to 2.4.4
Diffstat (limited to 'deps/v8/src/liveedit.cc')
-rw-r--r--deps/v8/src/liveedit.cc60
1 files changed, 27 insertions, 33 deletions
diff --git a/deps/v8/src/liveedit.cc b/deps/v8/src/liveedit.cc
index 5a8749e51..41523a82a 100644
--- a/deps/v8/src/liveedit.cc
+++ b/deps/v8/src/liveedit.cc
@@ -617,9 +617,33 @@ class FunctionInfoListener {
current_parent_index_ = info.GetParentIndex();
}
-// TODO(LiveEdit): Move private method below.
-// This private section was created here to avoid moving the function
-// to keep already complex diff simpler.
+ public:
+ // Saves only function code, because for a script function we
+ // may never create a SharedFunctionInfo object.
+ void FunctionCode(Handle<Code> function_code) {
+ FunctionInfoWrapper info =
+ FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
+ info.SetFunctionCode(function_code, Handle<Object>(Heap::null_value()));
+ }
+
+ // Saves full information about a function: its code, its scope info
+ // and a SharedFunctionInfo object.
+ void FunctionInfo(Handle<SharedFunctionInfo> shared, Scope* scope) {
+ if (!shared->IsSharedFunctionInfo()) {
+ return;
+ }
+ FunctionInfoWrapper info =
+ FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
+ info.SetFunctionCode(Handle<Code>(shared->code()),
+ Handle<Object>(shared->scope_info()));
+ info.SetSharedFunctionInfo(shared);
+
+ Handle<Object> scope_info_list(SerializeFunctionScope(scope));
+ info.SetOuterScopeInfo(scope_info_list);
+ }
+
+ Handle<JSArray> GetResult() { return result_; }
+
private:
Object* SerializeFunctionScope(Scope* scope) {
HandleScope handle_scope;
@@ -676,36 +700,6 @@ class FunctionInfoListener {
return *scope_info_list;
}
- public:
- // Saves only function code, because for a script function we
- // may never create a SharedFunctionInfo object.
- void FunctionCode(Handle<Code> function_code) {
- FunctionInfoWrapper info =
- FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
- info.SetFunctionCode(function_code, Handle<Object>(Heap::null_value()));
- }
-
- // Saves full information about a function: its code, its scope info
- // and a SharedFunctionInfo object.
- void FunctionInfo(Handle<SharedFunctionInfo> shared, Scope* scope) {
- if (!shared->IsSharedFunctionInfo()) {
- return;
- }
- FunctionInfoWrapper info =
- FunctionInfoWrapper::cast(result_->GetElement(current_parent_index_));
- info.SetFunctionCode(Handle<Code>(shared->code()),
- Handle<Object>(shared->scope_info()));
- info.SetSharedFunctionInfo(shared);
-
- Handle<Object> scope_info_list(SerializeFunctionScope(scope));
- info.SetOuterScopeInfo(scope_info_list);
- }
-
- Handle<JSArray> GetResult() {
- return result_;
- }
-
- private:
Handle<JSArray> result_;
int len_;
int current_parent_index_;