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

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

Issue 108443004: Ensure that Code objects' kind specific flags are initialized properly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix nit Created 7 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
« no previous file with comments | « src/objects.h ('k') | src/stub-cache.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 // 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 3897 matching lines...) Expand 10 before | Expand all | Expand 10 after
3908 } 3908 }
3909 3909
3910 3910
3911 int Code::arguments_count() { 3911 int Code::arguments_count() {
3912 ASSERT(is_call_stub() || is_keyed_call_stub() || 3912 ASSERT(is_call_stub() || is_keyed_call_stub() ||
3913 kind() == STUB || is_handler()); 3913 kind() == STUB || is_handler());
3914 return ExtractArgumentsCountFromFlags(flags()); 3914 return ExtractArgumentsCountFromFlags(flags());
3915 } 3915 }
3916 3916
3917 3917
3918 // For initialization.
3919 void Code::set_raw_kind_specific_flags1(int value) {
3920 WRITE_INT_FIELD(this, kKindSpecificFlags1Offset, value);
3921 }
3922
3923
3924 void Code::set_raw_kind_specific_flags2(int value) {
3925 WRITE_INT_FIELD(this, kKindSpecificFlags2Offset, value);
3926 }
3927
3928
3918 inline bool Code::is_crankshafted() { 3929 inline bool Code::is_crankshafted() {
3919 return IsCrankshaftedField::decode( 3930 return IsCrankshaftedField::decode(
3920 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3931 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3921 } 3932 }
3922 3933
3923 3934
3924 inline void Code::set_is_crankshafted(bool value) { 3935 inline void Code::set_is_crankshafted(bool value) {
3925 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3936 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3926 int updated = IsCrankshaftedField::update(previous, value); 3937 int updated = IsCrankshaftedField::update(previous, value);
3927 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3938 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
6460 #undef WRITE_UINT32_FIELD 6471 #undef WRITE_UINT32_FIELD
6461 #undef READ_SHORT_FIELD 6472 #undef READ_SHORT_FIELD
6462 #undef WRITE_SHORT_FIELD 6473 #undef WRITE_SHORT_FIELD
6463 #undef READ_BYTE_FIELD 6474 #undef READ_BYTE_FIELD
6464 #undef WRITE_BYTE_FIELD 6475 #undef WRITE_BYTE_FIELD
6465 6476
6466 6477
6467 } } // namespace v8::internal 6478 } } // namespace v8::internal
6468 6479
6469 #endif // V8_OBJECTS_INL_H_ 6480 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698