OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3981 // Lookup support for serialized scope info. Returns the | 3981 // Lookup support for serialized scope info. Returns the |
3982 // context slot index for a given slot name if the slot is present; otherwise | 3982 // context slot index for a given slot name if the slot is present; otherwise |
3983 // returns a value < 0. The name must be an internalized string. | 3983 // returns a value < 0. The name must be an internalized string. |
3984 // If the slot is present and mode != NULL, sets *mode to the corresponding | 3984 // If the slot is present and mode != NULL, sets *mode to the corresponding |
3985 // mode for that variable. | 3985 // mode for that variable. |
3986 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name, | 3986 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name, |
3987 VariableMode* mode, VariableLocation* location, | 3987 VariableMode* mode, VariableLocation* location, |
3988 InitializationFlag* init_flag, | 3988 InitializationFlag* init_flag, |
3989 MaybeAssignedFlag* maybe_assigned_flag); | 3989 MaybeAssignedFlag* maybe_assigned_flag); |
3990 | 3990 |
| 3991 // Lookup the name of a certain context slot by its index. |
| 3992 String* ContextSlotName(int slot_index); |
| 3993 |
3991 // Lookup support for serialized scope info. Returns the | 3994 // Lookup support for serialized scope info. Returns the |
3992 // parameter index for a given parameter name if the parameter is present; | 3995 // parameter index for a given parameter name if the parameter is present; |
3993 // otherwise returns a value < 0. The name must be an internalized string. | 3996 // otherwise returns a value < 0. The name must be an internalized string. |
3994 int ParameterIndex(String* name); | 3997 int ParameterIndex(String* name); |
3995 | 3998 |
3996 // Lookup support for serialized scope info. Returns the function context | 3999 // Lookup support for serialized scope info. Returns the function context |
3997 // slot index if the function name is present and context-allocated (named | 4000 // slot index if the function name is present and context-allocated (named |
3998 // function expressions, only), otherwise returns a value < 0. The name | 4001 // function expressions, only), otherwise returns a value < 0. The name |
3999 // must be an internalized string. | 4002 // must be an internalized string. |
4000 int FunctionContextSlotIndex(String* name, VariableMode* mode); | 4003 int FunctionContextSlotIndex(String* name, VariableMode* mode); |
(...skipping 6799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10800 } else { | 10803 } else { |
10801 value &= ~(1 << bit_position); | 10804 value &= ~(1 << bit_position); |
10802 } | 10805 } |
10803 return value; | 10806 return value; |
10804 } | 10807 } |
10805 }; | 10808 }; |
10806 | 10809 |
10807 } } // namespace v8::internal | 10810 } } // namespace v8::internal |
10808 | 10811 |
10809 #endif // V8_OBJECTS_H_ | 10812 #endif // V8_OBJECTS_H_ |
OLD | NEW |