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

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: 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
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 }
Hannes Payer (out of office) 2013/12/13 10:03:26 Can we have 2 newlines here?
Jakob Kummerow 2013/12/13 10:14:25 Sure.
3922 void Code::set_raw_kind_specific_flags2(int value) {
3923 WRITE_INT_FIELD(this, kKindSpecificFlags2Offset, value);
3924 }
3925
3926
3918 inline bool Code::is_crankshafted() { 3927 inline bool Code::is_crankshafted() {
3919 return IsCrankshaftedField::decode( 3928 return IsCrankshaftedField::decode(
3920 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3929 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3921 } 3930 }
3922 3931
3923 3932
3924 inline void Code::set_is_crankshafted(bool value) { 3933 inline void Code::set_is_crankshafted(bool value) {
3925 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3934 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3926 int updated = IsCrankshaftedField::update(previous, value); 3935 int updated = IsCrankshaftedField::update(previous, value);
3927 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3936 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
6460 #undef WRITE_UINT32_FIELD 6469 #undef WRITE_UINT32_FIELD
6461 #undef READ_SHORT_FIELD 6470 #undef READ_SHORT_FIELD
6462 #undef WRITE_SHORT_FIELD 6471 #undef WRITE_SHORT_FIELD
6463 #undef READ_BYTE_FIELD 6472 #undef READ_BYTE_FIELD
6464 #undef WRITE_BYTE_FIELD 6473 #undef WRITE_BYTE_FIELD
6465 6474
6466 6475
6467 } } // namespace v8::internal 6476 } } // namespace v8::internal
6468 6477
6469 #endif // V8_OBJECTS_INL_H_ 6478 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/stub-cache.cc » ('j') | src/stub-cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698