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 3382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3436 // parameter index for a given parameter name if the parameter is present; | 3437 // parameter index for a given parameter name if the parameter is present; |
3437 // otherwise returns a value < 0. The name must be a symbol (canonicalized). | 3438 // otherwise returns a value < 0. The name must be a symbol (canonicalized). |
3438 int ParameterIndex(String* name); | 3439 int ParameterIndex(String* name); |
3439 | 3440 |
3440 // Lookup support for serialized scope info. Returns the function context | 3441 // Lookup support for serialized scope info. Returns the function context |
3441 // slot index if the function name is present and context-allocated (named | 3442 // slot index if the function name is present and context-allocated (named |
3442 // function expressions, only), otherwise returns a value < 0. The name | 3443 // function expressions, only), otherwise returns a value < 0. The name |
3443 // must be a symbol (canonicalized). | 3444 // must be a symbol (canonicalized). |
3444 int FunctionContextSlotIndex(String* name, VariableMode* mode); | 3445 int FunctionContextSlotIndex(String* name, VariableMode* mode); |
3445 | 3446 |
3446 static Handle<ScopeInfo> Create(Scope* scope); | 3447 static Handle<ScopeInfo> Create(Scope* scope, Zone* zone); |
3447 | 3448 |
3448 // Serializes empty scope info. | 3449 // Serializes empty scope info. |
3449 static ScopeInfo* Empty(); | 3450 static ScopeInfo* Empty(); |
3450 | 3451 |
3451 #ifdef DEBUG | 3452 #ifdef DEBUG |
3452 void Print(); | 3453 void Print(); |
3453 #endif | 3454 #endif |
3454 | 3455 |
3455 // The layout of the static part of a ScopeInfo is as follows. Each entry is | 3456 // The layout of the static part of a ScopeInfo is as follows. Each entry is |
3456 // numeric and occupies one array slot. | 3457 // numeric and occupies one array slot. |
(...skipping 5257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8714 } else { | 8715 } else { |
8715 value &= ~(1 << bit_position); | 8716 value &= ~(1 << bit_position); |
8716 } | 8717 } |
8717 return value; | 8718 return value; |
8718 } | 8719 } |
8719 }; | 8720 }; |
8720 | 8721 |
8721 } } // namespace v8::internal | 8722 } } // namespace v8::internal |
8722 | 8723 |
8723 #endif // V8_OBJECTS_H_ | 8724 #endif // V8_OBJECTS_H_ |
OLD | NEW |