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

Side by Side Diff: src/contexts.h

Issue 1360403002: Revert of [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/builtins.h ('k') | 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 507 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
508 } 508 }
509 509
510 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) { 510 static int FunctionMapIndex(LanguageMode language_mode, FunctionKind kind) {
511 if (IsGeneratorFunction(kind)) { 511 if (IsGeneratorFunction(kind)) {
512 return is_strong(language_mode) ? STRONG_GENERATOR_FUNCTION_MAP_INDEX : 512 return is_strong(language_mode) ? STRONG_GENERATOR_FUNCTION_MAP_INDEX :
513 is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX 513 is_strict(language_mode) ? STRICT_GENERATOR_FUNCTION_MAP_INDEX
514 : SLOPPY_GENERATOR_FUNCTION_MAP_INDEX; 514 : SLOPPY_GENERATOR_FUNCTION_MAP_INDEX;
515 } 515 }
516 516
517 if (IsClassConstructor(kind)) { 517 if (IsConstructor(kind)) {
518 // Use strict function map (no own "caller" / "arguments") 518 // Use strict function map (no own "caller" / "arguments")
519 return is_strong(language_mode) ? STRONG_CONSTRUCTOR_MAP_INDEX 519 return is_strong(language_mode) ? STRONG_CONSTRUCTOR_MAP_INDEX
520 : STRICT_FUNCTION_MAP_INDEX; 520 : STRICT_FUNCTION_MAP_INDEX;
521 } 521 }
522 522
523 if (IsArrowFunction(kind) || IsConciseMethod(kind) || 523 if (IsArrowFunction(kind) || IsConciseMethod(kind) ||
524 IsAccessorFunction(kind)) { 524 IsAccessorFunction(kind)) {
525 return is_strong(language_mode) 525 return is_strong(language_mode)
526 ? STRONG_FUNCTION_MAP_INDEX 526 ? STRONG_FUNCTION_MAP_INDEX
527 : STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX; 527 : STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX;
(...skipping 23 matching lines...) Expand all
551 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 551 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
552 #endif 552 #endif
553 553
554 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 554 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
555 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 555 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
556 }; 556 };
557 557
558 } } // namespace v8::internal 558 } } // namespace v8::internal
559 559
560 #endif // V8_CONTEXTS_H_ 560 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698