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

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

Issue 10377043: Fix function sorter from 11482 with correct fix. The sorter (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 7 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') | no next file » | 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 // 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 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 3075
3076 3076
3077 void Code::set_allow_osr_at_loop_nesting_level(int level) { 3077 void Code::set_allow_osr_at_loop_nesting_level(int level) {
3078 ASSERT_EQ(FUNCTION, kind()); 3078 ASSERT_EQ(FUNCTION, kind());
3079 ASSERT(level >= 0 && level <= kMaxLoopNestingMarker); 3079 ASSERT(level >= 0 && level <= kMaxLoopNestingMarker);
3080 WRITE_BYTE_FIELD(this, kAllowOSRAtLoopNestingLevelOffset, level); 3080 WRITE_BYTE_FIELD(this, kAllowOSRAtLoopNestingLevelOffset, level);
3081 } 3081 }
3082 3082
3083 3083
3084 int Code::profiler_ticks() { 3084 int Code::profiler_ticks() {
3085 if (kind() == OPTIMIZED_FUNCTION) return 0;
3086 ASSERT_EQ(FUNCTION, kind()); 3085 ASSERT_EQ(FUNCTION, kind());
3087 return READ_BYTE_FIELD(this, kProfilerTicksOffset); 3086 return READ_BYTE_FIELD(this, kProfilerTicksOffset);
3088 } 3087 }
3089 3088
3090 3089
3091 void Code::set_profiler_ticks(int ticks) { 3090 void Code::set_profiler_ticks(int ticks) {
3092 ASSERT_EQ(FUNCTION, kind()); 3091 ASSERT_EQ(FUNCTION, kind());
3093 ASSERT(ticks < 256); 3092 ASSERT(ticks < 256);
3094 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks); 3093 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks);
3095 } 3094 }
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
3666 kOptimizationDisabled, 3665 kOptimizationDisabled,
3667 disable)); 3666 disable));
3668 // If disabling optimizations we reflect that in the code object so 3667 // If disabling optimizations we reflect that in the code object so
3669 // it will not be counted as optimizable code. 3668 // it will not be counted as optimizable code.
3670 if ((code()->kind() == Code::FUNCTION) && disable) { 3669 if ((code()->kind() == Code::FUNCTION) && disable) {
3671 code()->set_optimizable(false); 3670 code()->set_optimizable(false);
3672 } 3671 }
3673 } 3672 }
3674 3673
3675 3674
3675 int SharedFunctionInfo::profiler_ticks() {
3676 if (Code::FUNCTION != code()->kind()) return 0;
Michael Starzinger 2012/05/08 12:27:09 Could we flip the operands here?
3677 return code()->profiler_ticks();
3678 }
3679
3680
3676 LanguageMode SharedFunctionInfo::language_mode() { 3681 LanguageMode SharedFunctionInfo::language_mode() {
3677 int hints = compiler_hints(); 3682 int hints = compiler_hints();
3678 if (BooleanBit::get(hints, kExtendedModeFunction)) { 3683 if (BooleanBit::get(hints, kExtendedModeFunction)) {
3679 ASSERT(BooleanBit::get(hints, kStrictModeFunction)); 3684 ASSERT(BooleanBit::get(hints, kStrictModeFunction));
3680 return EXTENDED_MODE; 3685 return EXTENDED_MODE;
3681 } 3686 }
3682 return BooleanBit::get(hints, kStrictModeFunction) 3687 return BooleanBit::get(hints, kStrictModeFunction)
3683 ? STRICT_MODE : CLASSIC_MODE; 3688 ? STRICT_MODE : CLASSIC_MODE;
3684 } 3689 }
3685 3690
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
4957 #undef WRITE_UINT32_FIELD 4962 #undef WRITE_UINT32_FIELD
4958 #undef READ_SHORT_FIELD 4963 #undef READ_SHORT_FIELD
4959 #undef WRITE_SHORT_FIELD 4964 #undef WRITE_SHORT_FIELD
4960 #undef READ_BYTE_FIELD 4965 #undef READ_BYTE_FIELD
4961 #undef WRITE_BYTE_FIELD 4966 #undef WRITE_BYTE_FIELD
4962 4967
4963 4968
4964 } } // namespace v8::internal 4969 } } // namespace v8::internal
4965 4970
4966 #endif // V8_OBJECTS_INL_H_ 4971 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698