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 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2262 } | 2262 } |
2263 } | 2263 } |
2264 | 2264 |
2265 | 2265 |
2266 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2266 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
2267 Register object, | 2267 Register object, |
2268 Handle<Map> type, | 2268 Handle<Map> type, |
2269 Handle<String> name) { | 2269 Handle<String> name) { |
2270 LookupResult lookup(isolate()); | 2270 LookupResult lookup(isolate()); |
2271 type->LookupInDescriptors(NULL, *name, &lookup); | 2271 type->LookupInDescriptors(NULL, *name, &lookup); |
2272 ASSERT(lookup.IsProperty() && | 2272 ASSERT(lookup.IsFound() && |
2273 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); | 2273 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); |
2274 if (lookup.type() == FIELD) { | 2274 if (lookup.type() == FIELD) { |
2275 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2275 int index = lookup.GetLocalFieldIndexFromMap(*type); |
2276 int offset = index * kPointerSize; | 2276 int offset = index * kPointerSize; |
2277 if (index < 0) { | 2277 if (index < 0) { |
2278 // Negative property indices are in-object properties, indexed | 2278 // Negative property indices are in-object properties, indexed |
2279 // from the end of the fixed part of the object. | 2279 // from the end of the fixed part of the object. |
2280 __ lw(result, FieldMemOperand(object, offset + type->instance_size())); | 2280 __ lw(result, FieldMemOperand(object, offset + type->instance_size())); |
2281 } else { | 2281 } else { |
2282 // Non-negative property indices are in the properties array. | 2282 // Non-negative property indices are in the properties array. |
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4732 ASSERT(!environment->HasBeenRegistered()); | 4732 ASSERT(!environment->HasBeenRegistered()); |
4733 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4733 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
4734 ASSERT(osr_pc_offset_ == -1); | 4734 ASSERT(osr_pc_offset_ == -1); |
4735 osr_pc_offset_ = masm()->pc_offset(); | 4735 osr_pc_offset_ = masm()->pc_offset(); |
4736 } | 4736 } |
4737 | 4737 |
4738 | 4738 |
4739 #undef __ | 4739 #undef __ |
4740 | 4740 |
4741 } } // namespace v8::internal | 4741 } } // namespace v8::internal |
OLD | NEW |