OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2178 __ mov(result, FieldOperand(object, JSObject::kPropertiesOffset)); | 2178 __ mov(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
2179 __ mov(result, FieldOperand(result, instr->hydrogen()->offset())); | 2179 __ mov(result, FieldOperand(result, instr->hydrogen()->offset())); |
2180 } | 2180 } |
2181 } | 2181 } |
2182 | 2182 |
2183 | 2183 |
2184 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2184 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
2185 Register object, | 2185 Register object, |
2186 Handle<Map> type, | 2186 Handle<Map> type, |
2187 Handle<String> name) { | 2187 Handle<String> name) { |
2188 LookupResult lookup; | 2188 LookupResult lookup(isolate()); |
2189 type->LookupInDescriptors(NULL, *name, &lookup); | 2189 type->LookupInDescriptors(NULL, *name, &lookup); |
2190 ASSERT(lookup.IsProperty() && | 2190 ASSERT(lookup.IsProperty() && |
2191 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); | 2191 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); |
2192 if (lookup.type() == FIELD) { | 2192 if (lookup.type() == FIELD) { |
2193 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2193 int index = lookup.GetLocalFieldIndexFromMap(*type); |
2194 int offset = index * kPointerSize; | 2194 int offset = index * kPointerSize; |
2195 if (index < 0) { | 2195 if (index < 0) { |
2196 // Negative property indices are in-object properties, indexed | 2196 // Negative property indices are in-object properties, indexed |
2197 // from the end of the fixed part of the object. | 2197 // from the end of the fixed part of the object. |
2198 __ mov(result, FieldOperand(object, offset + type->instance_size())); | 2198 __ mov(result, FieldOperand(object, offset + type->instance_size())); |
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4520 env->deoptimization_index()); | 4520 env->deoptimization_index()); |
4521 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4521 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4522 } | 4522 } |
4523 | 4523 |
4524 | 4524 |
4525 #undef __ | 4525 #undef __ |
4526 | 4526 |
4527 } } // namespace v8::internal | 4527 } } // namespace v8::internal |
4528 | 4528 |
4529 #endif // V8_TARGET_ARCH_IA32 | 4529 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |