| OLD | NEW |
| 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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 return SimpleFieldLoad(length_index); | 1194 return SimpleFieldLoad(length_index); |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 Handle<JSObject> holder(lookup->holder()); | 1197 Handle<JSObject> holder(lookup->holder()); |
| 1198 LoadStubCompiler compiler(isolate(), cache_holder, kind()); | 1198 LoadStubCompiler compiler(isolate(), cache_holder, kind()); |
| 1199 | 1199 |
| 1200 switch (lookup->type()) { | 1200 switch (lookup->type()) { |
| 1201 case FIELD: { | 1201 case FIELD: { |
| 1202 PropertyIndex field = lookup->GetFieldIndex(); | 1202 PropertyIndex field = lookup->GetFieldIndex(); |
| 1203 if (object.is_identical_to(holder)) { | 1203 if (object.is_identical_to(holder)) { |
| 1204 return SimpleFieldLoad(field.translate(holder), | 1204 return SimpleFieldLoad(field.translate(holder->map()), |
| 1205 field.is_inobject(holder), | 1205 field.is_inobject(holder->map()), |
| 1206 lookup->representation()); | 1206 lookup->representation()); |
| 1207 } | 1207 } |
| 1208 return compiler.CompileLoadField( | 1208 return compiler.CompileLoadField( |
| 1209 object, holder, name, field, lookup->representation()); | 1209 object, holder, name, field, lookup->representation()); |
| 1210 } | 1210 } |
| 1211 case CONSTANT: { | 1211 case CONSTANT: { |
| 1212 Handle<Object> constant(lookup->GetConstant(), isolate()); | 1212 Handle<Object> constant(lookup->GetConstant(), isolate()); |
| 1213 // TODO(2803): Don't compute a stub for cons strings because they cannot | 1213 // TODO(2803): Don't compute a stub for cons strings because they cannot |
| 1214 // be embedded into code. | 1214 // be embedded into code. |
| 1215 if (constant->IsConsString()) break; | 1215 if (constant->IsConsString()) break; |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2768 #undef ADDR | 2768 #undef ADDR |
| 2769 }; | 2769 }; |
| 2770 | 2770 |
| 2771 | 2771 |
| 2772 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2772 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2773 return IC_utilities[id]; | 2773 return IC_utilities[id]; |
| 2774 } | 2774 } |
| 2775 | 2775 |
| 2776 | 2776 |
| 2777 } } // namespace v8::internal | 2777 } } // namespace v8::internal |
| OLD | NEW |