| OLD | NEW |
| 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 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3030 | 3030 |
| 3031 // This object provides quick access to scope info details for runtime | 3031 // This object provides quick access to scope info details for runtime |
| 3032 // routines w/o the need to explicitly create a ScopeInfo object. | 3032 // routines w/o the need to explicitly create a ScopeInfo object. |
| 3033 class SerializedScopeInfo : public FixedArray { | 3033 class SerializedScopeInfo : public FixedArray { |
| 3034 public : | 3034 public : |
| 3035 static SerializedScopeInfo* cast(Object* object) { | 3035 static SerializedScopeInfo* cast(Object* object) { |
| 3036 ASSERT(object->IsSerializedScopeInfo()); | 3036 ASSERT(object->IsSerializedScopeInfo()); |
| 3037 return reinterpret_cast<SerializedScopeInfo*>(object); | 3037 return reinterpret_cast<SerializedScopeInfo*>(object); |
| 3038 } | 3038 } |
| 3039 | 3039 |
| 3040 // Return the type of this scope. | |
| 3041 ScopeType Type(); | |
| 3042 | |
| 3043 // Does this scope call eval? | 3040 // Does this scope call eval? |
| 3044 bool CallsEval(); | 3041 bool CallsEval(); |
| 3045 | 3042 |
| 3046 // Is this scope a strict mode scope? | 3043 // Is this scope a strict mode scope? |
| 3047 bool IsStrictMode(); | 3044 bool IsStrictMode(); |
| 3048 | 3045 |
| 3049 // Return the number of stack slots for code. | 3046 // Return the number of stack slots for code. |
| 3050 int NumberOfStackSlots(); | 3047 int NumberOfStackSlots(); |
| 3051 | 3048 |
| 3052 // Return the number of context slots for code. | 3049 // Return the number of context slots for code. |
| 3053 int NumberOfContextSlots(); | 3050 int NumberOfContextSlots(); |
| 3054 | 3051 |
| 3055 // Return if this has context slots besides MIN_CONTEXT_SLOTS; | 3052 // Return if this has context slots besides MIN_CONTEXT_SLOTS; |
| 3056 bool HasHeapAllocatedLocals(); | 3053 bool HasHeapAllocatedLocals(); |
| 3057 | 3054 |
| 3058 // Return if contexts are allocated for this scope. | |
| 3059 bool HasContext(); | |
| 3060 | |
| 3061 // Lookup support for serialized scope info. Returns the | 3055 // Lookup support for serialized scope info. Returns the |
| 3062 // the stack slot index for a given slot name if the slot is | 3056 // the stack slot index for a given slot name if the slot is |
| 3063 // present; otherwise returns a value < 0. The name must be a symbol | 3057 // present; otherwise returns a value < 0. The name must be a symbol |
| 3064 // (canonicalized). | 3058 // (canonicalized). |
| 3065 int StackSlotIndex(String* name); | 3059 int StackSlotIndex(String* name); |
| 3066 | 3060 |
| 3067 // Lookup support for serialized scope info. Returns the | 3061 // Lookup support for serialized scope info. Returns the |
| 3068 // context slot index for a given slot name if the slot is present; otherwise | 3062 // context slot index for a given slot name if the slot is present; otherwise |
| 3069 // returns a value < 0. The name must be a symbol (canonicalized). | 3063 // returns a value < 0. The name must be a symbol (canonicalized). |
| 3070 // If the slot is present and mode != NULL, sets *mode to the corresponding | 3064 // If the slot is present and mode != NULL, sets *mode to the corresponding |
| (...skipping 4564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7635 } else { | 7629 } else { |
| 7636 value &= ~(1 << bit_position); | 7630 value &= ~(1 << bit_position); |
| 7637 } | 7631 } |
| 7638 return value; | 7632 return value; |
| 7639 } | 7633 } |
| 7640 }; | 7634 }; |
| 7641 | 7635 |
| 7642 } } // namespace v8::internal | 7636 } } // namespace v8::internal |
| 7643 | 7637 |
| 7644 #endif // V8_OBJECTS_H_ | 7638 #endif // V8_OBJECTS_H_ |
| OLD | NEW |