| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // Create a ScopeInfo instance from SerializedScopeInfo. | 57 // Create a ScopeInfo instance from SerializedScopeInfo. |
| 58 explicit ScopeInfo(SerializedScopeInfo* data); | 58 explicit ScopeInfo(SerializedScopeInfo* data); |
| 59 | 59 |
| 60 // Creates a SerializedScopeInfo holding the serialized scope info. | 60 // Creates a SerializedScopeInfo holding the serialized scope info. |
| 61 Handle<SerializedScopeInfo> Serialize(); | 61 Handle<SerializedScopeInfo> Serialize(); |
| 62 | 62 |
| 63 // -------------------------------------------------------------------------- | 63 // -------------------------------------------------------------------------- |
| 64 // Lookup | 64 // Lookup |
| 65 | 65 |
| 66 Handle<String> function_name() const { return function_name_; } | 66 Handle<String> function_name() const { return function_name_; } |
| 67 | 67 |
| 68 Handle<String> parameter_name(int i) const { return parameters_[i]; } | 68 Handle<String> parameter_name(int i) const { return parameters_[i]; } |
| 69 int number_of_parameters() const { return parameters_.length(); } | 69 int number_of_parameters() const { return parameters_.length(); } |
| 70 | 70 |
| 71 Handle<String> stack_slot_name(int i) const { return stack_slots_[i]; } | 71 Handle<String> stack_slot_name(int i) const { return stack_slots_[i]; } |
| 72 int number_of_stack_slots() const { return stack_slots_.length(); } | 72 int number_of_stack_slots() const { return stack_slots_.length(); } |
| 73 | 73 |
| 74 Handle<String> context_slot_name(int i) const { | 74 Handle<String> context_slot_name(int i) const { |
| 75 return context_slots_[i - Context::MIN_CONTEXT_SLOTS]; | 75 return context_slots_[i - Context::MIN_CONTEXT_SLOTS]; |
| 76 } | 76 } |
| 77 int number_of_context_slots() const { | 77 int number_of_context_slots() const { |
| 78 int l = context_slots_.length(); | 78 int l = context_slots_.length(); |
| 79 return l == 0 ? 0 : l + Context::MIN_CONTEXT_SLOTS; | 79 return l == 0 ? 0 : l + Context::MIN_CONTEXT_SLOTS; |
| 80 } | 80 } |
| 81 | 81 |
| 82 Handle<String> LocalName(int i) const; | 82 Handle<String> LocalName(int i) const; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 static Key keys_[kLength]; | 226 static Key keys_[kLength]; |
| 227 static uint32_t values_[kLength]; | 227 static uint32_t values_[kLength]; |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 | 230 |
| 231 } } // namespace v8::internal | 231 } } // namespace v8::internal |
| 232 | 232 |
| 233 #endif // V8_SCOPEINFO_H_ | 233 #endif // V8_SCOPEINFO_H_ |
| OLD | NEW |