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

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

Issue 9221011: Collect AstNode type information (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: refactor to AstVisitor approach Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3670 matching lines...) Expand 10 before | Expand all | Expand 10 after
3681 } 3681 }
3682 3682
3683 BOOL_GETTER(SharedFunctionInfo, compiler_hints, is_extended_mode, 3683 BOOL_GETTER(SharedFunctionInfo, compiler_hints, is_extended_mode,
3684 kExtendedModeFunction) 3684 kExtendedModeFunction)
3685 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) 3685 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative)
3686 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, 3686 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
3687 name_should_print_as_anonymous, 3687 name_should_print_as_anonymous,
3688 kNameShouldPrintAsAnonymous) 3688 kNameShouldPrintAsAnonymous)
3689 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) 3689 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
3690 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) 3690 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
3691 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_crankshaft,
3692 kDontCrankshaft)
3693 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline)
3691 3694
3692 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) 3695 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
3693 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) 3696 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
3694 3697
3695 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) 3698 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset)
3696 3699
3697 bool Script::HasValidSource() { 3700 bool Script::HasValidSource() {
3698 Object* src = this->source(); 3701 Object* src = this->source();
3699 if (!src->IsString()) return true; 3702 if (!src->IsString()) return true;
3700 String* src_str = String::cast(src); 3703 String* src_str = String::cast(src);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 Smi* SharedFunctionInfo::deopt_counter() { 3763 Smi* SharedFunctionInfo::deopt_counter() {
3761 return reinterpret_cast<Smi*>(READ_FIELD(this, kDeoptCounterOffset)); 3764 return reinterpret_cast<Smi*>(READ_FIELD(this, kDeoptCounterOffset));
3762 } 3765 }
3763 3766
3764 3767
3765 void SharedFunctionInfo::set_deopt_counter(Smi* value) { 3768 void SharedFunctionInfo::set_deopt_counter(Smi* value) {
3766 WRITE_FIELD(this, kDeoptCounterOffset, value); 3769 WRITE_FIELD(this, kDeoptCounterOffset, value);
3767 } 3770 }
3768 3771
3769 3772
3773 SMI_ACCESSORS(SharedFunctionInfo, ast_node_count, kAstNodeCountOffset)
3774
3775
3770 bool SharedFunctionInfo::is_compiled() { 3776 bool SharedFunctionInfo::is_compiled() {
3771 return code() != 3777 return code() !=
3772 Isolate::Current()->builtins()->builtin(Builtins::kLazyCompile); 3778 Isolate::Current()->builtins()->builtin(Builtins::kLazyCompile);
3773 } 3779 }
3774 3780
3775 3781
3776 bool SharedFunctionInfo::IsApiFunction() { 3782 bool SharedFunctionInfo::IsApiFunction() {
3777 return function_data()->IsFunctionTemplateInfo(); 3783 return function_data()->IsFunctionTemplateInfo();
3778 } 3784 }
3779 3785
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
4884 #undef WRITE_INT_FIELD 4890 #undef WRITE_INT_FIELD
4885 #undef READ_SHORT_FIELD 4891 #undef READ_SHORT_FIELD
4886 #undef WRITE_SHORT_FIELD 4892 #undef WRITE_SHORT_FIELD
4887 #undef READ_BYTE_FIELD 4893 #undef READ_BYTE_FIELD
4888 #undef WRITE_BYTE_FIELD 4894 #undef WRITE_BYTE_FIELD
4889 4895
4890 4896
4891 } } // namespace v8::internal 4897 } } // namespace v8::internal
4892 4898
4893 #endif // V8_OBJECTS_INL_H_ 4899 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698