| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 // Sanity check: The loaded value must be a JS-exposed kind of object, | 2255 // Sanity check: The loaded value must be a JS-exposed kind of object, |
| 2256 // not something internal (like a Map, or FixedArray). Check this here | 2256 // not something internal (like a Map, or FixedArray). Check this here |
| 2257 // to chase after a rare but recurring crash bug. It seems to always | 2257 // to chase after a rare but recurring crash bug. It seems to always |
| 2258 // occur for functions beginning with "this.foo.bar()", so be selective | 2258 // occur for functions beginning with "this.foo.bar()", so be selective |
| 2259 // and only insert the check for the first LoadIC (identified by slot). | 2259 // and only insert the check for the first LoadIC (identified by slot). |
| 2260 // TODO(jkummerow): Remove this when it has generated a few crash reports. | 2260 // TODO(jkummerow): Remove this when it has generated a few crash reports. |
| 2261 // Don't forget to remove the Push() above as well! | 2261 // Don't forget to remove the Push() above as well! |
| 2262 if (FeedbackVector()->GetIndex(prop->PropertyFeedbackSlot()) == 6) { | 2262 if (FeedbackVector()->GetIndex(prop->PropertyFeedbackSlot()) == 6) { |
| 2263 __ Pop(LoadDescriptor::ReceiverRegister()); | 2263 __ Pop(LoadDescriptor::ReceiverRegister()); |
| 2264 | 2264 |
| 2265 Label ok; | 2265 Label ok, sound_alarm; |
| 2266 __ JumpIfSmi(rax, &ok, Label::kNear); | 2266 __ JumpIfSmi(rax, &ok, Label::kNear); |
| 2267 __ movp(rbx, FieldOperand(rax, HeapObject::kMapOffset)); | 2267 __ movp(rbx, FieldOperand(rax, HeapObject::kMapOffset)); |
| 2268 __ CmpInstanceType(rbx, LAST_PRIMITIVE_TYPE); | 2268 __ CompareRoot(rbx, Heap::kMetaMapRootIndex); |
| 2269 __ j(below_equal, &ok, Label::kNear); | 2269 __ j(equal, &sound_alarm); |
| 2270 __ CmpInstanceType(rbx, FIRST_JS_RECEIVER_TYPE); | 2270 __ CompareRoot(rbx, Heap::kFixedArrayMapRootIndex); |
| 2271 __ j(above_equal, &ok, Label::kNear); | 2271 __ j(not_equal, &ok, Label::kNear); |
| 2272 | 2272 |
| 2273 __ bind(&sound_alarm); |
| 2273 __ Push(Smi::FromInt(0xaabbccdd)); | 2274 __ Push(Smi::FromInt(0xaabbccdd)); |
| 2274 __ Push(LoadDescriptor::ReceiverRegister()); | 2275 __ Push(LoadDescriptor::ReceiverRegister()); |
| 2275 __ movp(rbx, FieldOperand(LoadDescriptor::ReceiverRegister(), | 2276 __ movp(rbx, FieldOperand(LoadDescriptor::ReceiverRegister(), |
| 2276 HeapObject::kMapOffset)); | 2277 HeapObject::kMapOffset)); |
| 2277 __ Push(rbx); | 2278 __ Push(rbx); |
| 2278 __ movp(rbx, FieldOperand(LoadDescriptor::ReceiverRegister(), | 2279 __ movp(rbx, FieldOperand(LoadDescriptor::ReceiverRegister(), |
| 2279 JSObject::kPropertiesOffset)); | 2280 JSObject::kPropertiesOffset)); |
| 2280 __ Push(rbx); | 2281 __ Push(rbx); |
| 2281 __ int3(); | 2282 __ int3(); |
| 2282 | 2283 |
| (...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5204 Assembler::target_address_at(call_target_address, | 5205 Assembler::target_address_at(call_target_address, |
| 5205 unoptimized_code)); | 5206 unoptimized_code)); |
| 5206 return OSR_AFTER_STACK_CHECK; | 5207 return OSR_AFTER_STACK_CHECK; |
| 5207 } | 5208 } |
| 5208 | 5209 |
| 5209 | 5210 |
| 5210 } // namespace internal | 5211 } // namespace internal |
| 5211 } // namespace v8 | 5212 } // namespace v8 |
| 5212 | 5213 |
| 5213 #endif // V8_TARGET_ARCH_X64 | 5214 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |