| 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 3363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3417 // parameter index for a given parameter name if the parameter is present; | 3418 // parameter index for a given parameter name if the parameter is present; |
| 3418 // otherwise returns a value < 0. The name must be a symbol (canonicalized). | 3419 // otherwise returns a value < 0. The name must be a symbol (canonicalized). |
| 3419 int ParameterIndex(String* name); | 3420 int ParameterIndex(String* name); |
| 3420 | 3421 |
| 3421 // Lookup support for serialized scope info. Returns the function context | 3422 // Lookup support for serialized scope info. Returns the function context |
| 3422 // slot index if the function name is present and context-allocated (named | 3423 // slot index if the function name is present and context-allocated (named |
| 3423 // function expressions, only), otherwise returns a value < 0. The name | 3424 // function expressions, only), otherwise returns a value < 0. The name |
| 3424 // must be a symbol (canonicalized). | 3425 // must be a symbol (canonicalized). |
| 3425 int FunctionContextSlotIndex(String* name, VariableMode* mode); | 3426 int FunctionContextSlotIndex(String* name, VariableMode* mode); |
| 3426 | 3427 |
| 3427 static Handle<ScopeInfo> Create(Scope* scope); | 3428 static Handle<ScopeInfo> Create(Scope* scope, Zone* zone); |
| 3428 | 3429 |
| 3429 // Serializes empty scope info. | 3430 // Serializes empty scope info. |
| 3430 static ScopeInfo* Empty(); | 3431 static ScopeInfo* Empty(); |
| 3431 | 3432 |
| 3432 #ifdef DEBUG | 3433 #ifdef DEBUG |
| 3433 void Print(); | 3434 void Print(); |
| 3434 #endif | 3435 #endif |
| 3435 | 3436 |
| 3436 // The layout of the static part of a ScopeInfo is as follows. Each entry is | 3437 // The layout of the static part of a ScopeInfo is as follows. Each entry is |
| 3437 // numeric and occupies one array slot. | 3438 // numeric and occupies one array slot. |
| (...skipping 5240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8678 } else { | 8679 } else { |
| 8679 value &= ~(1 << bit_position); | 8680 value &= ~(1 << bit_position); |
| 8680 } | 8681 } |
| 8681 return value; | 8682 return value; |
| 8682 } | 8683 } |
| 8683 }; | 8684 }; |
| 8684 | 8685 |
| 8685 } } // namespace v8::internal | 8686 } } // namespace v8::internal |
| 8686 | 8687 |
| 8687 #endif // V8_OBJECTS_H_ | 8688 #endif // V8_OBJECTS_H_ |
| OLD | NEW |