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

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

Issue 8677008: Relax inlining limits for simple leaf functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename "heavy" and add comments. Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after
3547 3547
3548 3548
3549 BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode, 3549 BOOL_GETTER(SharedFunctionInfo, compiler_hints, strict_mode,
3550 kStrictModeFunction) 3550 kStrictModeFunction)
3551 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) 3551 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
3552 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, 3552 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
3553 name_should_print_as_anonymous, 3553 name_should_print_as_anonymous,
3554 kNameShouldPrintAsAnonymous) 3554 kNameShouldPrintAsAnonymous)
3555 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) 3555 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
3556 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) 3556 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
3557 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_primitive, kIsPrimitive)
3558
3559
3560 int SharedFunctionInfo::ast_node_count() {
3561 return (compiler_hints() >> kAstNodeCountShift) & kAstNodeCountMask;
3562 }
3563
3564
3565 void SharedFunctionInfo::set_ast_node_count(int ast_node_count) {
3566 if (ast_node_count > kAstNodeCountMask) {
3567 ast_node_count = kAstNodeCountMask;
3568 }
3569 set_compiler_hints((compiler_hints() &
3570 (~(kAstNodeCountMask << kAstNodeCountShift))) |
3571 (ast_node_count << kAstNodeCountShift));
3572 }
3573
3557 3574
3558 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) 3575 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
3559 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) 3576 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
3560 3577
3561 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) 3578 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset)
3562 3579
3563 bool Script::HasValidSource() { 3580 bool Script::HasValidSource() {
3564 Object* src = this->source(); 3581 Object* src = this->source();
3565 if (!src->IsString()) return true; 3582 if (!src->IsString()) return true;
3566 String* src_str = String::cast(src); 3583 String* src_str = String::cast(src);
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 #undef WRITE_INT_FIELD 4686 #undef WRITE_INT_FIELD
4670 #undef READ_SHORT_FIELD 4687 #undef READ_SHORT_FIELD
4671 #undef WRITE_SHORT_FIELD 4688 #undef WRITE_SHORT_FIELD
4672 #undef READ_BYTE_FIELD 4689 #undef READ_BYTE_FIELD
4673 #undef WRITE_BYTE_FIELD 4690 #undef WRITE_BYTE_FIELD
4674 4691
4675 4692
4676 } } // namespace v8::internal 4693 } } // namespace v8::internal
4677 4694
4678 #endif // V8_OBJECTS_INL_H_ 4695 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698