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

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

Issue 395823002: Store builtin index on the builtin code object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/serialize.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 // 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 4782 matching lines...) Expand 10 before | Expand all | Expand 10 after
4793 } 4793 }
4794 4794
4795 4795
4796 void Code::set_profiler_ticks(int ticks) { 4796 void Code::set_profiler_ticks(int ticks) {
4797 ASSERT_EQ(FUNCTION, kind()); 4797 ASSERT_EQ(FUNCTION, kind());
4798 ASSERT(ticks < 256); 4798 ASSERT(ticks < 256);
4799 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks); 4799 WRITE_BYTE_FIELD(this, kProfilerTicksOffset, ticks);
4800 } 4800 }
4801 4801
4802 4802
4803 int Code::builtin_index() {
4804 ASSERT_EQ(BUILTIN, kind());
4805 return READ_INT32_FIELD(this, kKindSpecificFlags1Offset);
4806 }
4807
4808
4809 void Code::set_builtin_index(int index) {
4810 ASSERT_EQ(BUILTIN, kind());
4811 WRITE_INT32_FIELD(this, kKindSpecificFlags1Offset, index);
4812 }
4813
4814
4803 unsigned Code::stack_slots() { 4815 unsigned Code::stack_slots() {
4804 ASSERT(is_crankshafted()); 4816 ASSERT(is_crankshafted());
4805 return StackSlotsField::decode( 4817 return StackSlotsField::decode(
4806 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 4818 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
4807 } 4819 }
4808 4820
4809 4821
4810 void Code::set_stack_slots(unsigned slots) { 4822 void Code::set_stack_slots(unsigned slots) {
4811 CHECK(slots <= (1 << kStackSlotsBitCount)); 4823 CHECK(slots <= (1 << kStackSlotsBitCount));
4812 ASSERT(is_crankshafted()); 4824 ASSERT(is_crankshafted());
(...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
7169 #undef READ_SHORT_FIELD 7181 #undef READ_SHORT_FIELD
7170 #undef WRITE_SHORT_FIELD 7182 #undef WRITE_SHORT_FIELD
7171 #undef READ_BYTE_FIELD 7183 #undef READ_BYTE_FIELD
7172 #undef WRITE_BYTE_FIELD 7184 #undef WRITE_BYTE_FIELD
7173 #undef NOBARRIER_READ_BYTE_FIELD 7185 #undef NOBARRIER_READ_BYTE_FIELD
7174 #undef NOBARRIER_WRITE_BYTE_FIELD 7186 #undef NOBARRIER_WRITE_BYTE_FIELD
7175 7187
7176 } } // namespace v8::internal 7188 } } // namespace v8::internal
7177 7189
7178 #endif // V8_OBJECTS_INL_H_ 7190 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698