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

Side by Side Diff: src/runtime.cc

Issue 6804015: Debugger: show local scope before with in scope chain for functions created inside with block (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/debug-scopes.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 9803 matching lines...) Expand 10 before | Expand all | Expand 10 after
9814 if (context_->IsGlobalContext()) { 9814 if (context_->IsGlobalContext()) {
9815 // If there is a stack slot for .result then this local scope has been 9815 // If there is a stack slot for .result then this local scope has been
9816 // created for evaluating top level code and it is not a real local scope. 9816 // created for evaluating top level code and it is not a real local scope.
9817 // Checking for the existence of .result seems fragile, but the scope info 9817 // Checking for the existence of .result seems fragile, but the scope info
9818 // saved with the code object does not otherwise have that information. 9818 // saved with the code object does not otherwise have that information.
9819 int index = function_->shared()->scope_info()-> 9819 int index = function_->shared()->scope_info()->
9820 StackSlotIndex(isolate_->heap()->result_symbol()); 9820 StackSlotIndex(isolate_->heap()->result_symbol());
9821 at_local_ = index < 0; 9821 at_local_ = index < 0;
9822 } else if (context_->is_function_context()) { 9822 } else if (context_->is_function_context()) {
9823 at_local_ = true; 9823 at_local_ = true;
9824 } else if (context_->closure() != *function_) {
9825 // The context_ is a with block from the outer function.
9826 ASSERT(context_->has_extension());
9827 at_local_ = true;
9824 } 9828 }
9825 } 9829 }
9826 9830
9827 // More scopes? 9831 // More scopes?
9828 bool Done() { return context_.is_null(); } 9832 bool Done() { return context_.is_null(); }
9829 9833
9830 // Move to the next scope. 9834 // Move to the next scope.
9831 void Next() { 9835 void Next() {
9832 // If at a local scope mark the local scope as passed. 9836 // If at a local scope mark the local scope as passed.
9833 if (at_local_) { 9837 if (at_local_) {
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after
11940 } else { 11944 } else {
11941 // Handle last resort GC and make sure to allow future allocations 11945 // Handle last resort GC and make sure to allow future allocations
11942 // to grow the heap without causing GCs (if possible). 11946 // to grow the heap without causing GCs (if possible).
11943 isolate->counters()->gc_last_resort_from_js()->Increment(); 11947 isolate->counters()->gc_last_resort_from_js()->Increment();
11944 isolate->heap()->CollectAllGarbage(false); 11948 isolate->heap()->CollectAllGarbage(false);
11945 } 11949 }
11946 } 11950 }
11947 11951
11948 11952
11949 } } // namespace v8::internal 11953 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698