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

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

Issue 19954005: Eliminate map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Naming Created 7 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/x64/lithium-codegen-x64.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 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 DependentCode::kPrototypeCheckGroup); 3662 DependentCode::kPrototypeCheckGroup);
3663 } 3663 }
3664 3664
3665 3665
3666 bool Map::CanOmitPrototypeChecks() { 3666 bool Map::CanOmitPrototypeChecks() {
3667 return !HasTransitionArray() && !is_dictionary_map() && 3667 return !HasTransitionArray() && !is_dictionary_map() &&
3668 FLAG_omit_prototype_checks_for_leaf_maps; 3668 FLAG_omit_prototype_checks_for_leaf_maps;
3669 } 3669 }
3670 3670
3671 3671
3672 bool Map::CanOmitMapChecks() {
3673 return !HasTransitionArray() && !is_dictionary_map() &&
3674 FLAG_omit_map_checks_for_leaf_maps;
3675 }
3676
3677
3672 int DependentCode::number_of_entries(DependencyGroup group) { 3678 int DependentCode::number_of_entries(DependencyGroup group) {
3673 if (length() == 0) return 0; 3679 if (length() == 0) return 0;
3674 return Smi::cast(get(group))->value(); 3680 return Smi::cast(get(group))->value();
3675 } 3681 }
3676 3682
3677 3683
3678 void DependentCode::set_number_of_entries(DependencyGroup group, int value) { 3684 void DependentCode::set_number_of_entries(DependencyGroup group, int value) {
3679 set(group, Smi::FromInt(value)); 3685 set(group, Smi::FromInt(value));
3680 } 3686 }
3681 3687
(...skipping 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
6194 #undef WRITE_UINT32_FIELD 6200 #undef WRITE_UINT32_FIELD
6195 #undef READ_SHORT_FIELD 6201 #undef READ_SHORT_FIELD
6196 #undef WRITE_SHORT_FIELD 6202 #undef WRITE_SHORT_FIELD
6197 #undef READ_BYTE_FIELD 6203 #undef READ_BYTE_FIELD
6198 #undef WRITE_BYTE_FIELD 6204 #undef WRITE_BYTE_FIELD
6199 6205
6200 6206
6201 } } // namespace v8::internal 6207 } } // namespace v8::internal
6202 6208
6203 #endif // V8_OBJECTS_INL_H_ 6209 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698