| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // This object provides quick access to scope info details for runtime | 102 // This object provides quick access to scope info details for runtime |
| 103 // routines w/o the need to explicitly create a ScopeInfo object. | 103 // routines w/o the need to explicitly create a ScopeInfo object. |
| 104 class SerializedScopeInfo : public FixedArray { | 104 class SerializedScopeInfo : public FixedArray { |
| 105 public : | 105 public : |
| 106 | 106 |
| 107 static SerializedScopeInfo* cast(Object* object) { | 107 static SerializedScopeInfo* cast(Object* object) { |
| 108 ASSERT(object->IsFixedArray()); | 108 ASSERT(object->IsFixedArray()); |
| 109 return reinterpret_cast<SerializedScopeInfo*>(object); | 109 return reinterpret_cast<SerializedScopeInfo*>(object); |
| 110 } | 110 } |
| 111 | 111 |
| 112 // Does this scope call eval. | 112 // Does this scope call eval? |
| 113 bool CallsEval(); | 113 bool CallsEval(); |
| 114 | 114 |
| 115 // Does this scope have an arguments shadow? |
| 116 bool HasArgumentsShadow() { |
| 117 return StackSlotIndex(GetHeap()->arguments_shadow_symbol()) >= 0; |
| 118 } |
| 119 |
| 115 // Return the number of stack slots for code. | 120 // Return the number of stack slots for code. |
| 116 int NumberOfStackSlots(); | 121 int NumberOfStackSlots(); |
| 117 | 122 |
| 118 // Return the number of context slots for code. | 123 // Return the number of context slots for code. |
| 119 int NumberOfContextSlots(); | 124 int NumberOfContextSlots(); |
| 120 | 125 |
| 121 // Return if this has context slots besides MIN_CONTEXT_SLOTS; | 126 // Return if this has context slots besides MIN_CONTEXT_SLOTS; |
| 122 bool HasHeapAllocatedLocals(); | 127 bool HasHeapAllocatedLocals(); |
| 123 | 128 |
| 124 // Lookup support for serialized scope info. Returns the | 129 // Lookup support for serialized scope info. Returns the |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 uint32_t values_[kLength]; | 240 uint32_t values_[kLength]; |
| 236 | 241 |
| 237 friend class Isolate; | 242 friend class Isolate; |
| 238 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); | 243 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); |
| 239 }; | 244 }; |
| 240 | 245 |
| 241 | 246 |
| 242 } } // namespace v8::internal | 247 } } // namespace v8::internal |
| 243 | 248 |
| 244 #endif // V8_SCOPEINFO_H_ | 249 #endif // V8_SCOPEINFO_H_ |
| OLD | NEW |