| 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 3880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3891 String* StrongModeFreeVariableName(int var); | 3891 String* StrongModeFreeVariableName(int var); |
| 3892 int StrongModeFreeVariableStartPosition(int var); | 3892 int StrongModeFreeVariableStartPosition(int var); |
| 3893 int StrongModeFreeVariableEndPosition(int var); | 3893 int StrongModeFreeVariableEndPosition(int var); |
| 3894 | 3894 |
| 3895 // Lookup support for serialized scope info. Returns the | 3895 // Lookup support for serialized scope info. Returns the |
| 3896 // the stack slot index for a given slot name if the slot is | 3896 // the stack slot index for a given slot name if the slot is |
| 3897 // present; otherwise returns a value < 0. The name must be an internalized | 3897 // present; otherwise returns a value < 0. The name must be an internalized |
| 3898 // string. | 3898 // string. |
| 3899 int StackSlotIndex(String* name); | 3899 int StackSlotIndex(String* name); |
| 3900 | 3900 |
| 3901 // Lookup support for serialized scope info. Returns the | 3901 // Lookup support for serialized scope info. Returns the local context slot |
| 3902 // context slot index for a given slot name if the slot is present; otherwise | 3902 // index for a given slot name if the slot is present; otherwise |
| 3903 // returns a value < 0. The name must be an internalized string. | 3903 // returns a value < 0. The name must be an internalized string. |
| 3904 // If the slot is present and mode != NULL, sets *mode to the corresponding | 3904 // If the slot is present and mode != NULL, sets *mode to the corresponding |
| 3905 // mode for that variable. | 3905 // mode for that variable. |
| 3906 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name, | 3906 static int ContextSlotIndex(Handle<ScopeInfo> scope_info, Handle<String> name, |
| 3907 VariableMode* mode, VariableLocation* location, | 3907 VariableMode* mode, InitializationFlag* init_flag, |
| 3908 InitializationFlag* init_flag, | |
| 3909 MaybeAssignedFlag* maybe_assigned_flag); | 3908 MaybeAssignedFlag* maybe_assigned_flag); |
| 3910 | 3909 |
| 3910 // Similar to ContextSlotIndex() but this method searches only among |
| 3911 // global slots of the serialized scope info. Returns the context slot index |
| 3912 // for a given slot name if the slot is present; otherwise returns a |
| 3913 // value < 0. The name must be an internalized string. If the slot is present |
| 3914 // and mode != NULL, sets *mode to the corresponding mode for that variable. |
| 3915 static int ContextGlobalSlotIndex(Handle<ScopeInfo> scope_info, |
| 3916 Handle<String> name, VariableMode* mode, |
| 3917 InitializationFlag* init_flag, |
| 3918 MaybeAssignedFlag* maybe_assigned_flag); |
| 3919 |
| 3911 // Lookup the name of a certain context slot by its index. | 3920 // Lookup the name of a certain context slot by its index. |
| 3912 String* ContextSlotName(int slot_index); | 3921 String* ContextSlotName(int slot_index); |
| 3913 | 3922 |
| 3914 // Lookup support for serialized scope info. Returns the | 3923 // Lookup support for serialized scope info. Returns the |
| 3915 // parameter index for a given parameter name if the parameter is present; | 3924 // parameter index for a given parameter name if the parameter is present; |
| 3916 // otherwise returns a value < 0. The name must be an internalized string. | 3925 // otherwise returns a value < 0. The name must be an internalized string. |
| 3917 int ParameterIndex(String* name); | 3926 int ParameterIndex(String* name); |
| 3918 | 3927 |
| 3919 // Lookup support for serialized scope info. Returns the function context | 3928 // Lookup support for serialized scope info. Returns the function context |
| 3920 // slot index if the function name is present and context-allocated (named | 3929 // slot index if the function name is present and context-allocated (named |
| (...skipping 6493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10414 } else { | 10423 } else { |
| 10415 value &= ~(1 << bit_position); | 10424 value &= ~(1 << bit_position); |
| 10416 } | 10425 } |
| 10417 return value; | 10426 return value; |
| 10418 } | 10427 } |
| 10419 }; | 10428 }; |
| 10420 | 10429 |
| 10421 } } // namespace v8::internal | 10430 } } // namespace v8::internal |
| 10422 | 10431 |
| 10423 #endif // V8_OBJECTS_H_ | 10432 #endif // V8_OBJECTS_H_ |
| OLD | NEW |