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

Side by Side Diff: src/contexts.h

Issue 883073008: Accessor functions should have no prototype property (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use bitshift Created 5 years, 10 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 | « src/compiler.cc ('k') | src/globals.h » ('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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 static int SlotOffset(int index) { 567 static int SlotOffset(int index) {
568 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 568 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
569 } 569 }
570 570
571 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { 571 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) {
572 if (IsGeneratorFunction(kind)) { 572 if (IsGeneratorFunction(kind)) {
573 return is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX 573 return is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX
574 : SLOPPY_GENERATOR_FUNCTION_MAP_INDEX; 574 : SLOPPY_GENERATOR_FUNCTION_MAP_INDEX;
575 } 575 }
576 576
577 if (IsArrowFunction(kind) || IsConciseMethod(kind)) { 577 if (IsArrowFunction(kind) || IsConciseMethod(kind) ||
578 IsAccessorFunction(kind)) {
578 return is_strict(language_mode) 579 return is_strict(language_mode)
579 ? STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX 580 ? STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX
580 : SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX; 581 : SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX;
581 } 582 }
582 583
583 return is_strict(language_mode) ? STRICT_FUNCTION_MAP_INDEX 584 return is_strict(language_mode) ? STRICT_FUNCTION_MAP_INDEX
584 : SLOPPY_FUNCTION_MAP_INDEX; 585 : SLOPPY_FUNCTION_MAP_INDEX;
585 } 586 }
586 587
587 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize; 588 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize;
(...skipping 17 matching lines...) Expand all
605 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 606 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
606 #endif 607 #endif
607 608
608 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 609 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
609 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 610 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
610 }; 611 };
611 612
612 } } // namespace v8::internal 613 } } // namespace v8::internal
613 614
614 #endif // V8_CONTEXTS_H_ 615 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698