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

Side by Side Diff: src/contexts.h

Issue 8508052: Static resolution of outer variables in eval code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 9 years, 1 month 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/compiler.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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // 391 //
392 // 3) result.is_null(): 392 // 3) result.is_null():
393 // There was no binding found, *index is always -1 and *attributes is 393 // There was no binding found, *index is always -1 and *attributes is
394 // always ABSENT. 394 // always ABSENT.
395 Handle<Object> Lookup(Handle<String> name, 395 Handle<Object> Lookup(Handle<String> name,
396 ContextLookupFlags flags, 396 ContextLookupFlags flags,
397 int* index, 397 int* index,
398 PropertyAttributes* attributes, 398 PropertyAttributes* attributes,
399 BindingFlags* binding_flags); 399 BindingFlags* binding_flags);
400 400
401 // Determine if a local variable with the given name exists in a
402 // context. Do not consider context extension objects. This is
403 // used for compiling code using eval. If the context surrounding
404 // the eval call does not have a local variable with this name and
405 // does not contain a with statement the property is global unless
406 // it is shadowed by a property in an extension object introduced by
407 // eval.
408 bool GlobalIfNotShadowedByEval(Handle<String> name);
409
410 // Determine if any function scope in the context call eval and if
411 // any of those calls are in non-strict mode.
412 void ComputeEvalScopeInfo(bool* outer_scope_calls_non_strict_eval);
413
414 // Code generation support. 401 // Code generation support.
415 static int SlotOffset(int index) { 402 static int SlotOffset(int index) {
416 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 403 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
417 } 404 }
418 405
419 static const int kSize = kHeaderSize + GLOBAL_CONTEXT_SLOTS * kPointerSize; 406 static const int kSize = kHeaderSize + GLOBAL_CONTEXT_SLOTS * kPointerSize;
420 407
421 // GC support. 408 // GC support.
422 typedef FixedBodyDescriptor< 409 typedef FixedBodyDescriptor<
423 kHeaderSize, kSize, kSize> ScavengeBodyDescriptor; 410 kHeaderSize, kSize, kSize> ScavengeBodyDescriptor;
(...skipping 10 matching lines...) Expand all
434 #ifdef DEBUG 421 #ifdef DEBUG
435 // Bootstrapping-aware type checks. 422 // Bootstrapping-aware type checks.
436 static bool IsBootstrappingOrContext(Object* object); 423 static bool IsBootstrappingOrContext(Object* object);
437 static bool IsBootstrappingOrGlobalObject(Object* object); 424 static bool IsBootstrappingOrGlobalObject(Object* object);
438 #endif 425 #endif
439 }; 426 };
440 427
441 } } // namespace v8::internal 428 } } // namespace v8::internal
442 429
443 #endif // V8_CONTEXTS_H_ 430 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698