| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3552 // parameter index for a given parameter name if the parameter is present; | 3552 // parameter index for a given parameter name if the parameter is present; |
| 3553 // otherwise returns a value < 0. The name must be a symbol (canonicalized). | 3553 // otherwise returns a value < 0. The name must be a symbol (canonicalized). |
| 3554 int ParameterIndex(String* name); | 3554 int ParameterIndex(String* name); |
| 3555 | 3555 |
| 3556 // Lookup support for serialized scope info. Returns the function context | 3556 // Lookup support for serialized scope info. Returns the function context |
| 3557 // slot index if the function name is present and context-allocated (named | 3557 // slot index if the function name is present and context-allocated (named |
| 3558 // function expressions, only), otherwise returns a value < 0. The name | 3558 // function expressions, only), otherwise returns a value < 0. The name |
| 3559 // must be a symbol (canonicalized). | 3559 // must be a symbol (canonicalized). |
| 3560 int FunctionContextSlotIndex(String* name, VariableMode* mode); | 3560 int FunctionContextSlotIndex(String* name, VariableMode* mode); |
| 3561 | 3561 |
| 3562 |
| 3563 // Copies all the context locals into an object used to materialize a scope. |
| 3564 bool CopyContextLocalsToScopeObject(Isolate* isolate, |
| 3565 Handle<Context> context, |
| 3566 Handle<JSObject> scope_object); |
| 3567 |
| 3568 |
| 3562 static Handle<ScopeInfo> Create(Scope* scope, Zone* zone); | 3569 static Handle<ScopeInfo> Create(Scope* scope, Zone* zone); |
| 3563 | 3570 |
| 3564 // Serializes empty scope info. | 3571 // Serializes empty scope info. |
| 3565 static ScopeInfo* Empty(); | 3572 static ScopeInfo* Empty(); |
| 3566 | 3573 |
| 3567 #ifdef DEBUG | 3574 #ifdef DEBUG |
| 3568 void Print(); | 3575 void Print(); |
| 3569 #endif | 3576 #endif |
| 3570 | 3577 |
| 3571 // The layout of the static part of a ScopeInfo is as follows. Each entry is | 3578 // The layout of the static part of a ScopeInfo is as follows. Each entry is |
| (...skipping 5378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8950 } else { | 8957 } else { |
| 8951 value &= ~(1 << bit_position); | 8958 value &= ~(1 << bit_position); |
| 8952 } | 8959 } |
| 8953 return value; | 8960 return value; |
| 8954 } | 8961 } |
| 8955 }; | 8962 }; |
| 8956 | 8963 |
| 8957 } } // namespace v8::internal | 8964 } } // namespace v8::internal |
| 8958 | 8965 |
| 8959 #endif // V8_OBJECTS_H_ | 8966 #endif // V8_OBJECTS_H_ |
| OLD | NEW |