Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: src/contexts.h

Issue 7904008: Introduce with scope and rework variable resolution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Latest version. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | src/contexts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698