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

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

Issue 23537067: Add support for keyed-call on arrays of fast elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compare with actual map loaded from the context Created 7 years, 2 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
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 3764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3775 3775
3776 3776
3777 int Code::major_key() { 3777 int Code::major_key() {
3778 ASSERT(kind() == STUB || 3778 ASSERT(kind() == STUB ||
3779 kind() == BINARY_OP_IC || 3779 kind() == BINARY_OP_IC ||
3780 kind() == COMPARE_IC || 3780 kind() == COMPARE_IC ||
3781 kind() == COMPARE_NIL_IC || 3781 kind() == COMPARE_NIL_IC ||
3782 kind() == STORE_IC || 3782 kind() == STORE_IC ||
3783 kind() == LOAD_IC || 3783 kind() == LOAD_IC ||
3784 kind() == KEYED_LOAD_IC || 3784 kind() == KEYED_LOAD_IC ||
3785 kind() == KEYED_CALL_IC ||
3785 kind() == TO_BOOLEAN_IC); 3786 kind() == TO_BOOLEAN_IC);
3786 return StubMajorKeyField::decode( 3787 return StubMajorKeyField::decode(
3787 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3788 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3788 } 3789 }
3789 3790
3790 3791
3791 void Code::set_major_key(int major) { 3792 void Code::set_major_key(int major) {
3792 ASSERT(kind() == STUB || 3793 ASSERT(kind() == STUB ||
3793 kind() == BINARY_OP_IC || 3794 kind() == BINARY_OP_IC ||
3794 kind() == COMPARE_IC || 3795 kind() == COMPARE_IC ||
3795 kind() == COMPARE_NIL_IC || 3796 kind() == COMPARE_NIL_IC ||
3796 kind() == LOAD_IC || 3797 kind() == LOAD_IC ||
3797 kind() == KEYED_LOAD_IC || 3798 kind() == KEYED_LOAD_IC ||
3798 kind() == STORE_IC || 3799 kind() == STORE_IC ||
3799 kind() == KEYED_STORE_IC || 3800 kind() == KEYED_STORE_IC ||
3801 kind() == KEYED_CALL_IC ||
3800 kind() == TO_BOOLEAN_IC); 3802 kind() == TO_BOOLEAN_IC);
3801 ASSERT(0 <= major && major < 256); 3803 ASSERT(0 <= major && major < 256);
3802 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3804 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3803 int updated = StubMajorKeyField::update(previous, major); 3805 int updated = StubMajorKeyField::update(previous, major);
3804 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3806 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3805 } 3807 }
3806 3808
3807 3809
3808 bool Code::is_pregenerated() { 3810 bool Code::is_pregenerated() {
3809 return (kind() == STUB && IsPregeneratedField::decode(flags())); 3811 return (kind() == STUB && IsPregeneratedField::decode(flags()));
(...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after
6250 #undef WRITE_UINT32_FIELD 6252 #undef WRITE_UINT32_FIELD
6251 #undef READ_SHORT_FIELD 6253 #undef READ_SHORT_FIELD
6252 #undef WRITE_SHORT_FIELD 6254 #undef WRITE_SHORT_FIELD
6253 #undef READ_BYTE_FIELD 6255 #undef READ_BYTE_FIELD
6254 #undef WRITE_BYTE_FIELD 6256 #undef WRITE_BYTE_FIELD
6255 6257
6256 6258
6257 } } // namespace v8::internal 6259 } } // namespace v8::internal
6258 6260
6259 #endif // V8_OBJECTS_INL_H_ 6261 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698