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 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6368 DeoptimizeIf(no_condition, instr->environment()); | 6368 DeoptimizeIf(no_condition, instr->environment()); |
6369 } | 6369 } |
6370 } | 6370 } |
6371 | 6371 |
6372 | 6372 |
6373 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 6373 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
6374 // Nothing to see here, move on! | 6374 // Nothing to see here, move on! |
6375 } | 6375 } |
6376 | 6376 |
6377 | 6377 |
6378 void LCodeGen::DoDeleteProperty(LDeleteProperty* instr) { | |
6379 LOperand* obj = instr->object(); | |
6380 LOperand* key = instr->key(); | |
6381 __ push(ToOperand(obj)); | |
6382 EmitPushTaggedOperand(key); | |
6383 ASSERT(instr->HasPointerMap()); | |
6384 LPointerMap* pointers = instr->pointer_map(); | |
6385 RecordPosition(pointers->position()); | |
6386 // Create safepoint generator that will also ensure enough space in the | |
6387 // reloc info for patching in deoptimization (since this is invoking a | |
6388 // builtin) | |
6389 SafepointGenerator safepoint_generator( | |
6390 this, pointers, Safepoint::kLazyDeopt); | |
6391 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); | |
6392 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION, safepoint_generator); | |
6393 } | |
6394 | |
6395 | |
6396 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 6378 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
6397 PushSafepointRegistersScope scope(this); | 6379 PushSafepointRegistersScope scope(this); |
6398 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 6380 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
6399 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); | 6381 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); |
6400 RecordSafepointWithLazyDeopt( | 6382 RecordSafepointWithLazyDeopt( |
6401 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 6383 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
6402 ASSERT(instr->HasEnvironment()); | 6384 ASSERT(instr->HasEnvironment()); |
6403 LEnvironment* env = instr->environment(); | 6385 LEnvironment* env = instr->environment(); |
6404 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 6386 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
6405 } | 6387 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6466 // backpatching it with the spill slot operands. | 6448 // backpatching it with the spill slot operands. |
6467 ASSERT(!environment->HasBeenRegistered()); | 6449 ASSERT(!environment->HasBeenRegistered()); |
6468 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 6450 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
6469 | 6451 |
6470 // Normally we record the first unknown OSR value as the entrypoint to the OSR | 6452 // Normally we record the first unknown OSR value as the entrypoint to the OSR |
6471 // code, but if there were none, record the entrypoint here. | 6453 // code, but if there were none, record the entrypoint here. |
6472 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset(); | 6454 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset(); |
6473 } | 6455 } |
6474 | 6456 |
6475 | 6457 |
6476 void LCodeGen::DoIn(LIn* instr) { | |
6477 LOperand* obj = instr->object(); | |
6478 LOperand* key = instr->key(); | |
6479 EmitPushTaggedOperand(key); | |
6480 EmitPushTaggedOperand(obj); | |
6481 ASSERT(instr->HasPointerMap()); | |
6482 LPointerMap* pointers = instr->pointer_map(); | |
6483 RecordPosition(pointers->position()); | |
6484 SafepointGenerator safepoint_generator( | |
6485 this, pointers, Safepoint::kLazyDeopt); | |
6486 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | |
6487 } | |
6488 | |
6489 | |
6490 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 6458 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
6491 __ cmp(eax, isolate()->factory()->undefined_value()); | 6459 __ cmp(eax, isolate()->factory()->undefined_value()); |
6492 DeoptimizeIf(equal, instr->environment()); | 6460 DeoptimizeIf(equal, instr->environment()); |
6493 | 6461 |
6494 __ cmp(eax, isolate()->factory()->null_value()); | 6462 __ cmp(eax, isolate()->factory()->null_value()); |
6495 DeoptimizeIf(equal, instr->environment()); | 6463 DeoptimizeIf(equal, instr->environment()); |
6496 | 6464 |
6497 __ test(eax, Immediate(kSmiTagMask)); | 6465 __ test(eax, Immediate(kSmiTagMask)); |
6498 DeoptimizeIf(zero, instr->environment()); | 6466 DeoptimizeIf(zero, instr->environment()); |
6499 | 6467 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6572 FixedArray::kHeaderSize - kPointerSize)); | 6540 FixedArray::kHeaderSize - kPointerSize)); |
6573 __ bind(&done); | 6541 __ bind(&done); |
6574 } | 6542 } |
6575 | 6543 |
6576 | 6544 |
6577 #undef __ | 6545 #undef __ |
6578 | 6546 |
6579 } } // namespace v8::internal | 6547 } } // namespace v8::internal |
6580 | 6548 |
6581 #endif // V8_TARGET_ARCH_IA32 | 6549 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |