| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 // Does this scope call eval. | 106 // Does this scope call eval. |
| 107 static bool CallsEval(Code* code); | 107 static bool CallsEval(Code* code); |
| 108 | 108 |
| 109 // Return the number of stack slots for code. | 109 // Return the number of stack slots for code. |
| 110 static int NumberOfStackSlots(Code* code); | 110 static int NumberOfStackSlots(Code* code); |
| 111 | 111 |
| 112 // Return the number of context slots for code. | 112 // Return the number of context slots for code. |
| 113 static int NumberOfContextSlots(Code* code); | 113 static int NumberOfContextSlots(Code* code); |
| 114 | 114 |
| 115 // Return if this has context slots besides MIN_CONTEXT_SLOTS; |
| 116 static bool HasHeapAllocatedLocals(Code* code); |
| 117 |
| 115 // Lookup support for scope info embedded in Code objects. Returns | 118 // Lookup support for scope info embedded in Code objects. Returns |
| 116 // the stack slot index for a given slot name if the slot is | 119 // the stack slot index for a given slot name if the slot is |
| 117 // present; otherwise returns a value < 0. The name must be a symbol | 120 // present; otherwise returns a value < 0. The name must be a symbol |
| 118 // (canonicalized). | 121 // (canonicalized). |
| 119 static int StackSlotIndex(Code* code, String* name); | 122 static int StackSlotIndex(Code* code, String* name); |
| 120 | 123 |
| 121 // Lookup support for scope info embedded in Code objects. Returns the | 124 // Lookup support for scope info embedded in Code objects. Returns the |
| 122 // context slot index for a given slot name if the slot is present; otherwise | 125 // context slot index for a given slot name if the slot is present; otherwise |
| 123 // returns a value < 0. The name must be a symbol (canonicalized). | 126 // returns a value < 0. The name must be a symbol (canonicalized). |
| 124 // If the slot is present and mode != NULL, sets *mode to the corresponding | 127 // If the slot is present and mode != NULL, sets *mode to the corresponding |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 }; | 231 }; |
| 229 | 232 |
| 230 static Key keys_[kLength]; | 233 static Key keys_[kLength]; |
| 231 static uint32_t values_[kLength]; | 234 static uint32_t values_[kLength]; |
| 232 }; | 235 }; |
| 233 | 236 |
| 234 | 237 |
| 235 } } // namespace v8::internal | 238 } } // namespace v8::internal |
| 236 | 239 |
| 237 #endif // V8_SCOPEINFO_H_ | 240 #endif // V8_SCOPEINFO_H_ |
| OLD | NEW |