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

Side by Side Diff: src/contexts.h

Issue 562253002: Arrow functions: Cleanup handling of the prototype property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | src/factory.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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 static int SlotOffset(int index) { 552 static int SlotOffset(int index) {
553 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 553 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
554 } 554 }
555 555
556 static int FunctionMapIndex(StrictMode strict_mode, FunctionKind kind) { 556 static int FunctionMapIndex(StrictMode strict_mode, FunctionKind kind) {
557 if (IsGeneratorFunction(kind)) { 557 if (IsGeneratorFunction(kind)) {
558 return strict_mode == SLOPPY ? SLOPPY_GENERATOR_FUNCTION_MAP_INDEX 558 return strict_mode == SLOPPY ? SLOPPY_GENERATOR_FUNCTION_MAP_INDEX
559 : STRICT_GENERATOR_FUNCTION_MAP_INDEX; 559 : STRICT_GENERATOR_FUNCTION_MAP_INDEX;
560 } 560 }
561 561
562 if (IsConciseMethod(kind)) { 562 if (IsArrowFunction(kind) || IsConciseMethod(kind)) {
563 return strict_mode == SLOPPY 563 return strict_mode == SLOPPY
564 ? SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX 564 ? SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX
565 : STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX; 565 : STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX;
566 } 566 }
567 567
568 return strict_mode == SLOPPY ? SLOPPY_FUNCTION_MAP_INDEX 568 return strict_mode == SLOPPY ? SLOPPY_FUNCTION_MAP_INDEX
569 : STRICT_FUNCTION_MAP_INDEX; 569 : STRICT_FUNCTION_MAP_INDEX;
570 } 570 }
571 571
572 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize; 572 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize;
(...skipping 17 matching lines...) Expand all
590 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 590 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
591 #endif 591 #endif
592 592
593 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 593 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
594 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 594 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
595 }; 595 };
596 596
597 } } // namespace v8::internal 597 } } // namespace v8::internal
598 598
599 #endif // V8_CONTEXTS_H_ 599 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698