| 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 23 matching lines...) Expand all Loading... |
| 34 #include "list.h" | 34 #include "list.h" |
| 35 #include "property-details.h" | 35 #include "property-details.h" |
| 36 #include "smart-array-pointer.h" | 36 #include "smart-array-pointer.h" |
| 37 #include "unicode-inl.h" | 37 #include "unicode-inl.h" |
| 38 #if V8_TARGET_ARCH_ARM | 38 #if V8_TARGET_ARCH_ARM |
| 39 #include "arm/constants-arm.h" | 39 #include "arm/constants-arm.h" |
| 40 #elif V8_TARGET_ARCH_MIPS | 40 #elif V8_TARGET_ARCH_MIPS |
| 41 #include "mips/constants-mips.h" | 41 #include "mips/constants-mips.h" |
| 42 #endif | 42 #endif |
| 43 #include "v8checks.h" | 43 #include "v8checks.h" |
| 44 #include "zone.h" |
| 44 | 45 |
| 45 | 46 |
| 46 // | 47 // |
| 47 // Most object types in the V8 JavaScript are described in this file. | 48 // Most object types in the V8 JavaScript are described in this file. |
| 48 // | 49 // |
| 49 // Inheritance hierarchy: | 50 // Inheritance hierarchy: |
| 50 // - MaybeObject (an object or a failure) | 51 // - MaybeObject (an object or a failure) |
| 51 // - Failure (immediate for marking failed operation) | 52 // - Failure (immediate for marking failed operation) |
| 52 // - Object | 53 // - Object |
| 53 // - Smi (immediate small integer) | 54 // - Smi (immediate small integer) |
| (...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3420 // parameter index for a given parameter name if the parameter is present; | 3421 // parameter index for a given parameter name if the parameter is present; |
| 3421 // otherwise returns a value < 0. The name must be a symbol (canonicalized). | 3422 // otherwise returns a value < 0. The name must be a symbol (canonicalized). |
| 3422 int ParameterIndex(String* name); | 3423 int ParameterIndex(String* name); |
| 3423 | 3424 |
| 3424 // Lookup support for serialized scope info. Returns the function context | 3425 // Lookup support for serialized scope info. Returns the function context |
| 3425 // slot index if the function name is present and context-allocated (named | 3426 // slot index if the function name is present and context-allocated (named |
| 3426 // function expressions, only), otherwise returns a value < 0. The name | 3427 // function expressions, only), otherwise returns a value < 0. The name |
| 3427 // must be a symbol (canonicalized). | 3428 // must be a symbol (canonicalized). |
| 3428 int FunctionContextSlotIndex(String* name, VariableMode* mode); | 3429 int FunctionContextSlotIndex(String* name, VariableMode* mode); |
| 3429 | 3430 |
| 3430 static Handle<ScopeInfo> Create(Scope* scope); | 3431 static Handle<ScopeInfo> Create(Scope* scope, Zone* zone); |
| 3431 | 3432 |
| 3432 // Serializes empty scope info. | 3433 // Serializes empty scope info. |
| 3433 static ScopeInfo* Empty(); | 3434 static ScopeInfo* Empty(); |
| 3434 | 3435 |
| 3435 #ifdef DEBUG | 3436 #ifdef DEBUG |
| 3436 void Print(); | 3437 void Print(); |
| 3437 #endif | 3438 #endif |
| 3438 | 3439 |
| 3439 // The layout of the static part of a ScopeInfo is as follows. Each entry is | 3440 // The layout of the static part of a ScopeInfo is as follows. Each entry is |
| 3440 // numeric and occupies one array slot. | 3441 // numeric and occupies one array slot. |
| (...skipping 5257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8698 } else { | 8699 } else { |
| 8699 value &= ~(1 << bit_position); | 8700 value &= ~(1 << bit_position); |
| 8700 } | 8701 } |
| 8701 return value; | 8702 return value; |
| 8702 } | 8703 } |
| 8703 }; | 8704 }; |
| 8704 | 8705 |
| 8705 } } // namespace v8::internal | 8706 } } // namespace v8::internal |
| 8706 | 8707 |
| 8707 #endif // V8_OBJECTS_H_ | 8708 #endif // V8_OBJECTS_H_ |
| OLD | NEW |