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

Side by Side Diff: src/objects.h

Issue 1215423002: Fix ScopeInfo::StackSlotIndex to skip over non-locals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/accessors.cc ('k') | src/scopeinfo.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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 3982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 // Return true if this local was introduced by the compiler, and should not be 3993 // Return true if this local was introduced by the compiler, and should not be
3994 // exposed to the user in a debugger. 3994 // exposed to the user in a debugger.
3995 bool LocalIsSynthetic(int var); 3995 bool LocalIsSynthetic(int var);
3996 3996
3997 String* StrongModeFreeVariableName(int var); 3997 String* StrongModeFreeVariableName(int var);
3998 int StrongModeFreeVariableStartPosition(int var); 3998 int StrongModeFreeVariableStartPosition(int var);
3999 int StrongModeFreeVariableEndPosition(int var); 3999 int StrongModeFreeVariableEndPosition(int var);
4000 4000
4001 // Lookup support for serialized scope info. Returns the 4001 // Lookup support for serialized scope info. Returns the
4002 // the stack slot index for a given slot name if the slot is 4002 // the stack slot index for a given slot name if the slot is
4003 // present; otherwise returns a value < 0. The name must be an internalized 4003 // allocated to a local; otherwise returns a value < 0.
4004 // string. 4004 // The name must be an internalized string.
4005 int StackSlotIndex(String* name); 4005 int StackLocalSlotIndex(String* name);
4006 4006
4007 // Lookup support for serialized scope info. Returns the 4007 // Lookup support for serialized scope info. Returns the
4008 // context slot index for a given slot name if the slot is present; otherwise 4008 // context slot index for a given slot name if the slot is present; otherwise
4009 // returns a value < 0. The name must be an internalized string. 4009 // returns a value < 0. The name must be an internalized string.
4010 // If the slot is present and mode != NULL, sets *mode to the corresponding 4010 // If the slot is present and mode != NULL, sets *mode to the corresponding
4011 // mode for that variable. 4011 // mode for that variable.
4012 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name, 4012 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name,
4013 VariableMode* mode, InitializationFlag* init_flag, 4013 VariableMode* mode, InitializationFlag* init_flag,
4014 MaybeAssignedFlag* maybe_assigned_flag); 4014 MaybeAssignedFlag* maybe_assigned_flag);
4015 4015
(...skipping 6807 matching lines...) Expand 10 before | Expand all | Expand 10 after
10823 } else { 10823 } else {
10824 value &= ~(1 << bit_position); 10824 value &= ~(1 << bit_position);
10825 } 10825 }
10826 return value; 10826 return value;
10827 } 10827 }
10828 }; 10828 };
10829 10829
10830 } } // namespace v8::internal 10830 } } // namespace v8::internal
10831 10831
10832 #endif // V8_OBJECTS_H_ 10832 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698