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

Side by Side Diff: src/liveedit.cc

Issue 1218783005: Support for global var shortcuts in script contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing builds Created 5 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #include "src/liveedit.h" 8 #include "src/liveedit.h"
9 9
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 757
758 // Saves some description of scope. It stores name and indexes of 758 // Saves some description of scope. It stores name and indexes of
759 // variables in the whole scope chain. Null-named slots delimit 759 // variables in the whole scope chain. Null-named slots delimit
760 // scopes of this chain. 760 // scopes of this chain.
761 Scope* current_scope = scope; 761 Scope* current_scope = scope;
762 while (current_scope != NULL) { 762 while (current_scope != NULL) {
763 HandleScope handle_scope(isolate()); 763 HandleScope handle_scope(isolate());
764 ZoneList<Variable*> stack_list(current_scope->StackLocalCount(), zone); 764 ZoneList<Variable*> stack_list(current_scope->StackLocalCount(), zone);
765 ZoneList<Variable*> context_list( 765 ZoneList<Variable*> context_list(
766 current_scope->ContextLocalCount(), zone); 766 current_scope->ContextLocalCount(), zone);
767 current_scope->CollectStackAndContextLocals(&stack_list, &context_list); 767 ZoneList<Variable*> globals_list(current_scope->ContextGlobalCount(),
768 zone);
769 current_scope->CollectStackAndContextLocals(&stack_list, &context_list,
770 &globals_list);
768 context_list.Sort(&Variable::CompareIndex); 771 context_list.Sort(&Variable::CompareIndex);
769 772
770 for (int i = 0; i < context_list.length(); i++) { 773 for (int i = 0; i < context_list.length(); i++) {
771 SetElementSloppy(scope_info_list, 774 SetElementSloppy(scope_info_list,
772 scope_info_length, 775 scope_info_length,
773 context_list[i]->name()); 776 context_list[i]->name());
774 scope_info_length++; 777 scope_info_length++;
775 SetElementSloppy( 778 SetElementSloppy(
776 scope_info_list, 779 scope_info_list,
777 scope_info_length, 780 scope_info_length,
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 isolate_->active_function_info_listener()->FunctionCode(code); 2058 isolate_->active_function_info_listener()->FunctionCode(code);
2056 } 2059 }
2057 2060
2058 2061
2059 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2062 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2060 return isolate->active_function_info_listener() != NULL; 2063 return isolate->active_function_info_listener() != NULL;
2061 } 2064 }
2062 2065
2063 } // namespace internal 2066 } // namespace internal
2064 } // namespace v8 2067 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698