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

Side by Side Diff: src/contexts.h

Issue 2206483004: Sloppy eval declarations should not shadow lexical function declarations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 // 498 //
499 // 2) result->IsJSObject(): 499 // 2) result->IsJSObject():
500 // The binding was found as a named property in a context extension 500 // The binding was found as a named property in a context extension
501 // object (i.e., was introduced via eval), as a property on the subject 501 // object (i.e., was introduced via eval), as a property on the subject
502 // of with, or as a property of the global object. *index is -1 and 502 // of with, or as a property of the global object. *index is -1 and
503 // *attributes is not ABSENT. 503 // *attributes is not ABSENT.
504 // 504 //
505 // 3) result.is_null(): 505 // 3) result.is_null():
506 // There was no binding found, *index is always -1 and *attributes is 506 // There was no binding found, *index is always -1 and *attributes is
507 // always ABSENT. 507 // always ABSENT.
508 Handle<Object> Lookup(Handle<String> name, 508 Handle<Object> Lookup(Handle<String> name, ContextLookupFlags flags,
509 ContextLookupFlags flags, 509 int* index, PropertyAttributes* attributes,
510 int* index, 510 BindingFlags* binding_flags,
511 PropertyAttributes* attributes, 511 VariableMode* variable_mode);
512 BindingFlags* binding_flags);
513 512
514 // Code generation support. 513 // Code generation support.
515 static int SlotOffset(int index) { 514 static int SlotOffset(int index) {
516 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 515 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
517 } 516 }
518 517
519 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { 518 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) {
520 // Note: Must be kept in sync with FastNewClosureStub::Generate. 519 // Note: Must be kept in sync with FastNewClosureStub::Generate.
521 if (IsGeneratorFunction(kind)) { 520 if (IsGeneratorFunction(kind)) {
522 return is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX 521 return is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 #endif 566 #endif
568 567
569 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 568 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
570 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 569 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
571 }; 570 };
572 571
573 } // namespace internal 572 } // namespace internal
574 } // namespace v8 573 } // namespace v8
575 574
576 #endif // V8_CONTEXTS_H_ 575 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698