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

Side by Side Diff: src/objects.h

Issue 8344046: Reapply r9673 "Scope tree serialization and ScopeIterator cleanup." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Skip nested contexts of an internal function. Created 9 years, 2 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 | « src/contexts.h ('k') | src/parser.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3021 matching lines...) Expand 10 before | Expand all | Expand 10 after
3032 3032
3033 // This object provides quick access to scope info details for runtime 3033 // This object provides quick access to scope info details for runtime
3034 // routines w/o the need to explicitly create a ScopeInfo object. 3034 // routines w/o the need to explicitly create a ScopeInfo object.
3035 class SerializedScopeInfo : public FixedArray { 3035 class SerializedScopeInfo : public FixedArray {
3036 public : 3036 public :
3037 static SerializedScopeInfo* cast(Object* object) { 3037 static SerializedScopeInfo* cast(Object* object) {
3038 ASSERT(object->IsSerializedScopeInfo()); 3038 ASSERT(object->IsSerializedScopeInfo());
3039 return reinterpret_cast<SerializedScopeInfo*>(object); 3039 return reinterpret_cast<SerializedScopeInfo*>(object);
3040 } 3040 }
3041 3041
3042 // Return the type of this scope.
3043 ScopeType Type();
3044
3042 // Does this scope call eval? 3045 // Does this scope call eval?
3043 bool CallsEval(); 3046 bool CallsEval();
3044 3047
3045 // Is this scope a strict mode scope? 3048 // Is this scope a strict mode scope?
3046 bool IsStrictMode(); 3049 bool IsStrictMode();
3047 3050
3048 // Return the number of stack slots for code. 3051 // Return the number of stack slots for code.
3049 int NumberOfStackSlots(); 3052 int NumberOfStackSlots();
3050 3053
3051 // Return the number of context slots for code. 3054 // Return the number of context slots for code.
3052 int NumberOfContextSlots(); 3055 int NumberOfContextSlots();
3053 3056
3054 // Return if this has context slots besides MIN_CONTEXT_SLOTS; 3057 // Return if this has context slots besides MIN_CONTEXT_SLOTS;
3055 bool HasHeapAllocatedLocals(); 3058 bool HasHeapAllocatedLocals();
3056 3059
3060 // Return if contexts are allocated for this scope.
3061 bool HasContext();
3062
3057 // Lookup support for serialized scope info. Returns the 3063 // Lookup support for serialized scope info. Returns the
3058 // the stack slot index for a given slot name if the slot is 3064 // the stack slot index for a given slot name if the slot is
3059 // present; otherwise returns a value < 0. The name must be a symbol 3065 // present; otherwise returns a value < 0. The name must be a symbol
3060 // (canonicalized). 3066 // (canonicalized).
3061 int StackSlotIndex(String* name); 3067 int StackSlotIndex(String* name);
3062 3068
3063 // Lookup support for serialized scope info. Returns the 3069 // Lookup support for serialized scope info. Returns the
3064 // context slot index for a given slot name if the slot is present; otherwise 3070 // context slot index for a given slot name if the slot is present; otherwise
3065 // returns a value < 0. The name must be a symbol (canonicalized). 3071 // returns a value < 0. The name must be a symbol (canonicalized).
3066 // If the slot is present and mode != NULL, sets *mode to the corresponding 3072 // If the slot is present and mode != NULL, sets *mode to the corresponding
(...skipping 4587 matching lines...) Expand 10 before | Expand all | Expand 10 after
7654 } else { 7660 } else {
7655 value &= ~(1 << bit_position); 7661 value &= ~(1 << bit_position);
7656 } 7662 }
7657 return value; 7663 return value;
7658 } 7664 }
7659 }; 7665 };
7660 7666
7661 } } // namespace v8::internal 7667 } } // namespace v8::internal
7662 7668
7663 #endif // V8_OBJECTS_H_ 7669 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698