| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 // context. Do not consider context extension objects. This is | 385 // context. Do not consider context extension objects. This is |
| 386 // used for compiling code using eval. If the context surrounding | 386 // used for compiling code using eval. If the context surrounding |
| 387 // the eval call does not have a local variable with this name and | 387 // the eval call does not have a local variable with this name and |
| 388 // does not contain a with statement the property is global unless | 388 // does not contain a with statement the property is global unless |
| 389 // it is shadowed by a property in an extension object introduced by | 389 // it is shadowed by a property in an extension object introduced by |
| 390 // eval. | 390 // eval. |
| 391 bool GlobalIfNotShadowedByEval(Handle<String> name); | 391 bool GlobalIfNotShadowedByEval(Handle<String> name); |
| 392 | 392 |
| 393 // Determine if any function scope in the context call eval and if | 393 // Determine if any function scope in the context call eval and if |
| 394 // any of those calls are in non-strict mode. | 394 // any of those calls are in non-strict mode. |
| 395 void ComputeEvalScopeInfo(bool* outer_scope_calls_eval, | 395 void ComputeEvalScopeInfo(bool* outer_scope_calls_non_strict_eval); |
| 396 bool* outer_scope_calls_non_strict_eval); | |
| 397 | 396 |
| 398 // Code generation support. | 397 // Code generation support. |
| 399 static int SlotOffset(int index) { | 398 static int SlotOffset(int index) { |
| 400 return kHeaderSize + index * kPointerSize - kHeapObjectTag; | 399 return kHeaderSize + index * kPointerSize - kHeapObjectTag; |
| 401 } | 400 } |
| 402 | 401 |
| 403 static const int kSize = kHeaderSize + GLOBAL_CONTEXT_SLOTS * kPointerSize; | 402 static const int kSize = kHeaderSize + GLOBAL_CONTEXT_SLOTS * kPointerSize; |
| 404 | 403 |
| 405 // GC support. | 404 // GC support. |
| 406 typedef FixedBodyDescriptor< | 405 typedef FixedBodyDescriptor< |
| (...skipping 11 matching lines...) Expand all Loading... |
| 418 #ifdef DEBUG | 417 #ifdef DEBUG |
| 419 // Bootstrapping-aware type checks. | 418 // Bootstrapping-aware type checks. |
| 420 static bool IsBootstrappingOrContext(Object* object); | 419 static bool IsBootstrappingOrContext(Object* object); |
| 421 static bool IsBootstrappingOrGlobalObject(Object* object); | 420 static bool IsBootstrappingOrGlobalObject(Object* object); |
| 422 #endif | 421 #endif |
| 423 }; | 422 }; |
| 424 | 423 |
| 425 } } // namespace v8::internal | 424 } } // namespace v8::internal |
| 426 | 425 |
| 427 #endif // V8_CONTEXTS_H_ | 426 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |