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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 } | 2135 } |
2136 } | 2136 } |
2137 | 2137 |
2138 | 2138 |
2139 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2139 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
2140 Register object, | 2140 Register object, |
2141 Handle<Map> type, | 2141 Handle<Map> type, |
2142 Handle<String> name) { | 2142 Handle<String> name) { |
2143 LookupResult lookup(isolate()); | 2143 LookupResult lookup(isolate()); |
2144 type->LookupInDescriptors(NULL, *name, &lookup); | 2144 type->LookupInDescriptors(NULL, *name, &lookup); |
2145 ASSERT(lookup.IsProperty() && | 2145 ASSERT(lookup.IsFound() && |
2146 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); | 2146 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); |
2147 if (lookup.type() == FIELD) { | 2147 if (lookup.type() == FIELD) { |
2148 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2148 int index = lookup.GetLocalFieldIndexFromMap(*type); |
2149 int offset = index * kPointerSize; | 2149 int offset = index * kPointerSize; |
2150 if (index < 0) { | 2150 if (index < 0) { |
2151 // Negative property indices are in-object properties, indexed | 2151 // Negative property indices are in-object properties, indexed |
2152 // from the end of the fixed part of the object. | 2152 // from the end of the fixed part of the object. |
2153 __ movq(result, FieldOperand(object, offset + type->instance_size())); | 2153 __ movq(result, FieldOperand(object, offset + type->instance_size())); |
2154 } else { | 2154 } else { |
2155 // Non-negative property indices are in the properties array. | 2155 // Non-negative property indices are in the properties array. |
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4397 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4397 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
4398 ASSERT(osr_pc_offset_ == -1); | 4398 ASSERT(osr_pc_offset_ == -1); |
4399 osr_pc_offset_ = masm()->pc_offset(); | 4399 osr_pc_offset_ = masm()->pc_offset(); |
4400 } | 4400 } |
4401 | 4401 |
4402 #undef __ | 4402 #undef __ |
4403 | 4403 |
4404 } } // namespace v8::internal | 4404 } } // namespace v8::internal |
4405 | 4405 |
4406 #endif // V8_TARGET_ARCH_X64 | 4406 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |