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

Side by Side Diff: src/objects.h

Issue 7979001: Scope tree serialization and ScopeIterator cleanup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. 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 3002 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 3013
3014 // This object provides quick access to scope info details for runtime 3014 // This object provides quick access to scope info details for runtime
3015 // routines w/o the need to explicitly create a ScopeInfo object. 3015 // routines w/o the need to explicitly create a ScopeInfo object.
3016 class SerializedScopeInfo : public FixedArray { 3016 class SerializedScopeInfo : public FixedArray {
3017 public : 3017 public :
3018 static SerializedScopeInfo* cast(Object* object) { 3018 static SerializedScopeInfo* cast(Object* object) {
3019 ASSERT(object->IsSerializedScopeInfo()); 3019 ASSERT(object->IsSerializedScopeInfo());
3020 return reinterpret_cast<SerializedScopeInfo*>(object); 3020 return reinterpret_cast<SerializedScopeInfo*>(object);
3021 } 3021 }
3022 3022
3023 // Return the type of this scope.
3024 ScopeType Type();
3025
3023 // Does this scope call eval? 3026 // Does this scope call eval?
3024 bool CallsEval(); 3027 bool CallsEval();
3025 3028
3026 // Is this scope a strict mode scope? 3029 // Is this scope a strict mode scope?
3027 bool IsStrictMode(); 3030 bool IsStrictMode();
3028 3031
3029 // Return the number of stack slots for code. 3032 // Return the number of stack slots for code.
3030 int NumberOfStackSlots(); 3033 int NumberOfStackSlots();
3031 3034
3032 // Return the number of context slots for code. 3035 // Return the number of context slots for code.
3033 int NumberOfContextSlots(); 3036 int NumberOfContextSlots();
3034 3037
3035 // Return if this has context slots besides MIN_CONTEXT_SLOTS; 3038 // Return if this has context slots besides MIN_CONTEXT_SLOTS;
3036 bool HasHeapAllocatedLocals(); 3039 bool HasHeapAllocatedLocals();
3037 3040
3041 // Return if contexts are allocated for this scope.
3042 bool HasContext();
3043
3038 // Lookup support for serialized scope info. Returns the 3044 // Lookup support for serialized scope info. Returns the
3039 // the stack slot index for a given slot name if the slot is 3045 // the stack slot index for a given slot name if the slot is
3040 // present; otherwise returns a value < 0. The name must be a symbol 3046 // present; otherwise returns a value < 0. The name must be a symbol
3041 // (canonicalized). 3047 // (canonicalized).
3042 int StackSlotIndex(String* name); 3048 int StackSlotIndex(String* name);
3043 3049
3044 // Lookup support for serialized scope info. Returns the 3050 // Lookup support for serialized scope info. Returns the
3045 // context slot index for a given slot name if the slot is present; otherwise 3051 // context slot index for a given slot name if the slot is present; otherwise
3046 // returns a value < 0. The name must be a symbol (canonicalized). 3052 // returns a value < 0. The name must be a symbol (canonicalized).
3047 // If the slot is present and mode != NULL, sets *mode to the corresponding 3053 // If the slot is present and mode != NULL, sets *mode to the corresponding
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after
7606 } else { 7612 } else {
7607 value &= ~(1 << bit_position); 7613 value &= ~(1 << bit_position);
7608 } 7614 }
7609 return value; 7615 return value;
7610 } 7616 }
7611 }; 7617 };
7612 7618
7613 } } // namespace v8::internal 7619 } } // namespace v8::internal
7614 7620
7615 #endif // V8_OBJECTS_H_ 7621 #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