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

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

Issue 12886008: Unify kMaxArguments with number of bits used to encode it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/parser.h » ('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 3851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3862 return ic_state() == DEBUG_STUB && extra_ic_state() == DEBUG_BREAK; 3862 return ic_state() == DEBUG_STUB && extra_ic_state() == DEBUG_BREAK;
3863 } 3863 }
3864 3864
3865 3865
3866 Code::Flags Code::ComputeFlags(Kind kind, 3866 Code::Flags Code::ComputeFlags(Kind kind,
3867 InlineCacheState ic_state, 3867 InlineCacheState ic_state,
3868 ExtraICState extra_ic_state, 3868 ExtraICState extra_ic_state,
3869 StubType type, 3869 StubType type,
3870 int argc, 3870 int argc,
3871 InlineCacheHolderFlag holder) { 3871 InlineCacheHolderFlag holder) {
3872 ASSERT(argc < Code::kMaxArguments);
danno 2013/03/18 13:03:59 Why not <= ?
3872 // Compute the bit mask. 3873 // Compute the bit mask.
3873 int bits = KindField::encode(kind) 3874 unsigned int bits = KindField::encode(kind)
3874 | ICStateField::encode(ic_state) 3875 | ICStateField::encode(ic_state)
3875 | TypeField::encode(type) 3876 | TypeField::encode(type)
3876 | ExtraICStateField::encode(extra_ic_state) 3877 | ExtraICStateField::encode(extra_ic_state)
3877 | (argc << kArgumentsCountShift) 3878 | (argc << kArgumentsCountShift)
3878 | CacheHolderField::encode(holder); 3879 | CacheHolderField::encode(holder);
3879 return static_cast<Flags>(bits); 3880 return static_cast<Flags>(bits);
3880 } 3881 }
3881 3882
3882 3883
3883 Code::Flags Code::ComputeMonomorphicFlags(Kind kind, 3884 Code::Flags Code::ComputeMonomorphicFlags(Kind kind,
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
6010 #undef WRITE_UINT32_FIELD 6011 #undef WRITE_UINT32_FIELD
6011 #undef READ_SHORT_FIELD 6012 #undef READ_SHORT_FIELD
6012 #undef WRITE_SHORT_FIELD 6013 #undef WRITE_SHORT_FIELD
6013 #undef READ_BYTE_FIELD 6014 #undef READ_BYTE_FIELD
6014 #undef WRITE_BYTE_FIELD 6015 #undef WRITE_BYTE_FIELD
6015 6016
6016 6017
6017 } } // namespace v8::internal 6018 } } // namespace v8::internal
6018 6019
6019 #endif // V8_OBJECTS_INL_H_ 6020 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698