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 2111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); | 2122 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
2123 __ movq(result, FieldOperand(result, instr->hydrogen()->offset())); | 2123 __ movq(result, FieldOperand(result, instr->hydrogen()->offset())); |
2124 } | 2124 } |
2125 } | 2125 } |
2126 | 2126 |
2127 | 2127 |
2128 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2128 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
2129 Register object, | 2129 Register object, |
2130 Handle<Map> type, | 2130 Handle<Map> type, |
2131 Handle<String> name) { | 2131 Handle<String> name) { |
2132 LookupResult lookup; | 2132 LookupResult lookup(isolate()); |
2133 type->LookupInDescriptors(NULL, *name, &lookup); | 2133 type->LookupInDescriptors(NULL, *name, &lookup); |
2134 ASSERT(lookup.IsProperty() && | 2134 ASSERT(lookup.IsProperty() && |
2135 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); | 2135 (lookup.type() == FIELD || lookup.type() == CONSTANT_FUNCTION)); |
2136 if (lookup.type() == FIELD) { | 2136 if (lookup.type() == FIELD) { |
2137 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2137 int index = lookup.GetLocalFieldIndexFromMap(*type); |
2138 int offset = index * kPointerSize; | 2138 int offset = index * kPointerSize; |
2139 if (index < 0) { | 2139 if (index < 0) { |
2140 // Negative property indices are in-object properties, indexed | 2140 // Negative property indices are in-object properties, indexed |
2141 // from the end of the fixed part of the object. | 2141 // from the end of the fixed part of the object. |
2142 __ movq(result, FieldOperand(object, offset + type->instance_size())); | 2142 __ movq(result, FieldOperand(object, offset + type->instance_size())); |
(...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4228 RegisterEnvironmentForDeoptimization(environment); | 4228 RegisterEnvironmentForDeoptimization(environment); |
4229 ASSERT(osr_pc_offset_ == -1); | 4229 ASSERT(osr_pc_offset_ == -1); |
4230 osr_pc_offset_ = masm()->pc_offset(); | 4230 osr_pc_offset_ = masm()->pc_offset(); |
4231 } | 4231 } |
4232 | 4232 |
4233 #undef __ | 4233 #undef __ |
4234 | 4234 |
4235 } } // namespace v8::internal | 4235 } } // namespace v8::internal |
4236 | 4236 |
4237 #endif // V8_TARGET_ARCH_X64 | 4237 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |