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

Side by Side Diff: src/objects-inl.h

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge 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 | « src/objects.h ('k') | src/parser.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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5552 5552
5553 void SharedFunctionInfo::set_strict_mode(StrictMode strict_mode) { 5553 void SharedFunctionInfo::set_strict_mode(StrictMode strict_mode) {
5554 // We only allow mode transitions from sloppy to strict. 5554 // We only allow mode transitions from sloppy to strict.
5555 DCHECK(this->strict_mode() == SLOPPY || this->strict_mode() == strict_mode); 5555 DCHECK(this->strict_mode() == SLOPPY || this->strict_mode() == strict_mode);
5556 int hints = compiler_hints(); 5556 int hints = compiler_hints();
5557 hints = BooleanBit::set(hints, kStrictModeFunction, strict_mode == STRICT); 5557 hints = BooleanBit::set(hints, kStrictModeFunction, strict_mode == STRICT);
5558 set_compiler_hints(hints); 5558 set_compiler_hints(hints);
5559 } 5559 }
5560 5560
5561 5561
5562 FunctionKind SharedFunctionInfo::kind() {
5563 return FunctionKindBits::decode(compiler_hints());
5564 }
5565
5566
5567 void SharedFunctionInfo::set_kind(FunctionKind kind) {
5568 DCHECK(IsValidFunctionKind(kind));
5569 int hints = compiler_hints();
5570 hints = FunctionKindBits::update(hints, kind);
5571 set_compiler_hints(hints);
5572 }
5573
5574
5562 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) 5575 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
5563 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin, 5576 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin,
5564 kInlineBuiltin) 5577 kInlineBuiltin)
5565 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, 5578 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
5566 name_should_print_as_anonymous, 5579 name_should_print_as_anonymous,
5567 kNameShouldPrintAsAnonymous) 5580 kNameShouldPrintAsAnonymous)
5568 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) 5581 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
5569 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) 5582 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
5570 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) 5583 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction)
5571 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) 5584 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
5572 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) 5585 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
5586 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow)
5573 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) 5587 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
5574 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) 5588 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method,
5589 kIsConciseMethod)
5575 5590
5576 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) 5591 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
5577 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) 5592 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
5578 5593
5579 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) 5594 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset)
5580 5595
5581 bool Script::HasValidSource() { 5596 bool Script::HasValidSource() {
5582 Object* src = this->source(); 5597 Object* src = this->source();
5583 if (!src->IsString()) return true; 5598 if (!src->IsString()) return true;
5584 String* src_str = String::cast(src); 5599 String* src_str = String::cast(src);
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
7248 #undef READ_SHORT_FIELD 7263 #undef READ_SHORT_FIELD
7249 #undef WRITE_SHORT_FIELD 7264 #undef WRITE_SHORT_FIELD
7250 #undef READ_BYTE_FIELD 7265 #undef READ_BYTE_FIELD
7251 #undef WRITE_BYTE_FIELD 7266 #undef WRITE_BYTE_FIELD
7252 #undef NOBARRIER_READ_BYTE_FIELD 7267 #undef NOBARRIER_READ_BYTE_FIELD
7253 #undef NOBARRIER_WRITE_BYTE_FIELD 7268 #undef NOBARRIER_WRITE_BYTE_FIELD
7254 7269
7255 } } // namespace v8::internal 7270 } } // namespace v8::internal
7256 7271
7257 #endif // V8_OBJECTS_INL_H_ 7272 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698