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

Unified Diff: src/objects.h

Issue 1335633002: Do not look for the slot in the ScopeInfo's global range when it's not necessary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index dd43f0fe5b08df6f813d7fabd23ed9880c8d1a33..113ba3a67102e687a1b9597c1bafdfa99e96592c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -3898,16 +3898,25 @@ class ScopeInfo : public FixedArray {
// string.
int StackSlotIndex(String* name);
- // Lookup support for serialized scope info. Returns the
- // context slot index for a given slot name if the slot is present; otherwise
+ // Lookup support for serialized scope info. Returns the local context slot
+ // index for a given slot name if the slot is present; otherwise
// returns a value < 0. The name must be an internalized string.
// If the slot is present and mode != NULL, sets *mode to the corresponding
// mode for that variable.
static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name,
- VariableMode* mode, VariableLocation* location,
- InitializationFlag* init_flag,
+ VariableMode* mode, InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag);
+ // Similar to ContextSlotIndex() but this method searches only among
+ // global slots of the serialized scope info. Returns the context slot index
+ // for a given slot name if the slot is present; otherwise returns a
+ // value < 0. The name must be an internalized string. If the slot is present
+ // and mode != NULL, sets *mode to the corresponding mode for that variable.
+ static int ContextGlobalSlotIndex(Handle<ScopeInfo> scope_info,
+ Handle<String> name, VariableMode* mode,
+ InitializationFlag* init_flag,
+ MaybeAssignedFlag* maybe_assigned_flag);
+
// Lookup the name of a certain context slot by its index.
String* ContextSlotName(int slot_index);
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698