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

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

Issue 11420011: Clean-up refactoring to eliminate GetLocalElementKind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Eps. Created 8 years, 1 month 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 5015 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 5026
5027 bool JSReceiver::HasLocalProperty(String* name) { 5027 bool JSReceiver::HasLocalProperty(String* name) {
5028 if (IsJSProxy()) { 5028 if (IsJSProxy()) {
5029 return JSProxy::cast(this)->HasPropertyWithHandler(name); 5029 return JSProxy::cast(this)->HasPropertyWithHandler(name);
5030 } 5030 }
5031 return GetLocalPropertyAttribute(name) != ABSENT; 5031 return GetLocalPropertyAttribute(name) != ABSENT;
5032 } 5032 }
5033 5033
5034 5034
5035 PropertyAttributes JSReceiver::GetPropertyAttribute(String* key) { 5035 PropertyAttributes JSReceiver::GetPropertyAttribute(String* key) {
5036 uint32_t index;
5037 if (IsJSObject() && key->AsArrayIndex(&index)) {
5038 return GetElementAttribute(index);
5039 }
Michael Starzinger 2012/11/15 21:45:37 I am not convinced that this is the right place to
rossberg 2012/11/16 12:50:02 I share your concern, but we already do this in va
Michael Starzinger 2012/11/16 13:18:51 Yes, I agree. This doesn't have to be part of this
5036 return GetPropertyAttributeWithReceiver(this, key); 5040 return GetPropertyAttributeWithReceiver(this, key);
5037 } 5041 }
5038 5042
5039 5043
5040 PropertyAttributes JSReceiver::GetElementAttribute(uint32_t index) { 5044 PropertyAttributes JSReceiver::GetElementAttribute(uint32_t index) {
5041 if (IsJSProxy()) { 5045 if (IsJSProxy()) {
5042 return JSProxy::cast(this)->GetElementAttributeWithHandler(this, index); 5046 return JSProxy::cast(this)->GetElementAttributeWithHandler(this, index);
5043 } 5047 }
5044 return JSObject::cast(this)->GetElementAttributeWithReceiver( 5048 return JSObject::cast(this)->GetElementAttributeWithReceiver(
5045 this, index, true); 5049 this, index, true);
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
5541 #undef WRITE_UINT32_FIELD 5545 #undef WRITE_UINT32_FIELD
5542 #undef READ_SHORT_FIELD 5546 #undef READ_SHORT_FIELD
5543 #undef WRITE_SHORT_FIELD 5547 #undef WRITE_SHORT_FIELD
5544 #undef READ_BYTE_FIELD 5548 #undef READ_BYTE_FIELD
5545 #undef WRITE_BYTE_FIELD 5549 #undef WRITE_BYTE_FIELD
5546 5550
5547 5551
5548 } } // namespace v8::internal 5552 } } // namespace v8::internal
5549 5553
5550 #endif // V8_OBJECTS_INL_H_ 5554 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698