| 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 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 } | 2209 } |
| 2210 } | 2210 } |
| 2211 | 2211 |
| 2212 | 2212 |
| 2213 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2213 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
| 2214 Register object, | 2214 Register object, |
| 2215 Handle<Map> type, | 2215 Handle<Map> type, |
| 2216 Handle<String> name) { | 2216 Handle<String> name) { |
| 2217 LookupResult lookup(isolate()); | 2217 LookupResult lookup(isolate()); |
| 2218 type->LookupInDescriptors(NULL, *name, &lookup); | 2218 type->LookupInDescriptors(NULL, *name, &lookup); |
| 2219 ASSERT(lookup.IsProperty() && | 2219 ASSERT(lookup.IsFound() && |
| 2220 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); | 2220 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); |
| 2221 if (lookup.type() == FIELD) { | 2221 if (lookup.type() == FIELD) { |
| 2222 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2222 int index = lookup.GetLocalFieldIndexFromMap(*type); |
| 2223 int offset = index * kPointerSize; | 2223 int offset = index * kPointerSize; |
| 2224 if (index < 0) { | 2224 if (index < 0) { |
| 2225 // Negative property indices are in-object properties, indexed | 2225 // Negative property indices are in-object properties, indexed |
| 2226 // from the end of the fixed part of the object. | 2226 // from the end of the fixed part of the object. |
| 2227 __ mov(result, FieldOperand(object, offset + type->instance_size())); | 2227 __ mov(result, FieldOperand(object, offset + type->instance_size())); |
| 2228 } else { | 2228 } else { |
| 2229 // Non-negative property indices are in the properties array. | 2229 // Non-negative property indices are in the properties array. |
| (...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4673 this, pointers, Safepoint::kLazyDeopt); | 4673 this, pointers, Safepoint::kLazyDeopt); |
| 4674 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4674 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4675 } | 4675 } |
| 4676 | 4676 |
| 4677 | 4677 |
| 4678 #undef __ | 4678 #undef __ |
| 4679 | 4679 |
| 4680 } } // namespace v8::internal | 4680 } } // namespace v8::internal |
| 4681 | 4681 |
| 4682 #endif // V8_TARGET_ARCH_IA32 | 4682 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |