OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 Comment(";;; Allocate local context"); | 200 Comment(";;; Allocate local context"); |
201 bool need_write_barrier = true; | 201 bool need_write_barrier = true; |
202 // Argument to NewContext is the function, which is in a1. | 202 // Argument to NewContext is the function, which is in a1. |
203 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 203 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
204 FastNewContextStub stub(isolate(), heap_slots); | 204 FastNewContextStub stub(isolate(), heap_slots); |
205 __ CallStub(&stub); | 205 __ CallStub(&stub); |
206 // Result of FastNewContextStub is always in new space. | 206 // Result of FastNewContextStub is always in new space. |
207 need_write_barrier = false; | 207 need_write_barrier = false; |
208 } else { | 208 } else { |
209 __ push(a1); | 209 __ push(a1); |
210 __ CallRuntime(Runtime::kHiddenNewFunctionContext, 1); | 210 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
211 } | 211 } |
212 RecordSafepoint(Safepoint::kNoLazyDeopt); | 212 RecordSafepoint(Safepoint::kNoLazyDeopt); |
213 // Context is returned in both v0. It replaces the context passed to us. | 213 // Context is returned in both v0. It replaces the context passed to us. |
214 // It's saved in the stack and kept live in cp. | 214 // It's saved in the stack and kept live in cp. |
215 __ mov(cp, v0); | 215 __ mov(cp, v0); |
216 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 216 __ sw(v0, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
217 // Copy any necessary parameters into the context. | 217 // Copy any necessary parameters into the context. |
218 int num_parameters = scope()->num_parameters(); | 218 int num_parameters = scope()->num_parameters(); |
219 for (int i = 0; i < num_parameters; i++) { | 219 for (int i = 0; i < num_parameters; i++) { |
220 Variable* var = scope()->parameter(i); | 220 Variable* var = scope()->parameter(i); |
(...skipping 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3520 } | 3520 } |
3521 } | 3521 } |
3522 | 3522 |
3523 | 3523 |
3524 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3524 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3525 ASSERT(ToRegister(instr->context()).is(cp)); | 3525 ASSERT(ToRegister(instr->context()).is(cp)); |
3526 __ li(scratch0(), instr->hydrogen()->pairs()); | 3526 __ li(scratch0(), instr->hydrogen()->pairs()); |
3527 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); | 3527 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); |
3528 // The context is the first argument. | 3528 // The context is the first argument. |
3529 __ Push(cp, scratch0(), scratch1()); | 3529 __ Push(cp, scratch0(), scratch1()); |
3530 CallRuntime(Runtime::kHiddenDeclareGlobals, 3, instr); | 3530 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
3531 } | 3531 } |
3532 | 3532 |
3533 | 3533 |
3534 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3534 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3535 int formal_parameter_count, | 3535 int formal_parameter_count, |
3536 int arity, | 3536 int arity, |
3537 LInstruction* instr, | 3537 LInstruction* instr, |
3538 A1State a1_state) { | 3538 A1State a1_state) { |
3539 bool dont_adapt_arguments = | 3539 bool dont_adapt_arguments = |
3540 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3540 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3609 // exponent: floating point exponent value. | 3609 // exponent: floating point exponent value. |
3610 | 3610 |
3611 Label allocated, slow; | 3611 Label allocated, slow; |
3612 __ LoadRoot(tmp4, Heap::kHeapNumberMapRootIndex); | 3612 __ LoadRoot(tmp4, Heap::kHeapNumberMapRootIndex); |
3613 __ AllocateHeapNumber(tmp1, tmp2, tmp3, tmp4, &slow); | 3613 __ AllocateHeapNumber(tmp1, tmp2, tmp3, tmp4, &slow); |
3614 __ Branch(&allocated); | 3614 __ Branch(&allocated); |
3615 | 3615 |
3616 // Slow case: Call the runtime system to do the number allocation. | 3616 // Slow case: Call the runtime system to do the number allocation. |
3617 __ bind(&slow); | 3617 __ bind(&slow); |
3618 | 3618 |
3619 CallRuntimeFromDeferred(Runtime::kHiddenAllocateHeapNumber, 0, instr, | 3619 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr, |
3620 instr->context()); | 3620 instr->context()); |
3621 // Set the pointer to the new heap number in tmp. | 3621 // Set the pointer to the new heap number in tmp. |
3622 if (!tmp1.is(v0)) | 3622 if (!tmp1.is(v0)) |
3623 __ mov(tmp1, v0); | 3623 __ mov(tmp1, v0); |
3624 // Restore input_reg after call to runtime. | 3624 // Restore input_reg after call to runtime. |
3625 __ LoadFromSafepointRegisterSlot(input, input); | 3625 __ LoadFromSafepointRegisterSlot(input, input); |
3626 __ lw(exponent, FieldMemOperand(input, HeapNumber::kExponentOffset)); | 3626 __ lw(exponent, FieldMemOperand(input, HeapNumber::kExponentOffset)); |
3627 | 3627 |
3628 __ bind(&allocated); | 3628 __ bind(&allocated); |
3629 // exponent: floating point exponent value. | 3629 // exponent: floating point exponent value. |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4475 // DoStringCharCodeAt above. | 4475 // DoStringCharCodeAt above. |
4476 if (instr->index()->IsConstantOperand()) { | 4476 if (instr->index()->IsConstantOperand()) { |
4477 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); | 4477 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); |
4478 __ Addu(scratch, zero_reg, Operand(Smi::FromInt(const_index))); | 4478 __ Addu(scratch, zero_reg, Operand(Smi::FromInt(const_index))); |
4479 __ push(scratch); | 4479 __ push(scratch); |
4480 } else { | 4480 } else { |
4481 Register index = ToRegister(instr->index()); | 4481 Register index = ToRegister(instr->index()); |
4482 __ SmiTag(index); | 4482 __ SmiTag(index); |
4483 __ push(index); | 4483 __ push(index); |
4484 } | 4484 } |
4485 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, instr, | 4485 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr, |
4486 instr->context()); | 4486 instr->context()); |
4487 __ AssertSmi(v0); | 4487 __ AssertSmi(v0); |
4488 __ SmiUntag(v0); | 4488 __ SmiUntag(v0); |
4489 __ StoreToSafepointRegisterSlot(v0, result); | 4489 __ StoreToSafepointRegisterSlot(v0, result); |
4490 } | 4490 } |
4491 | 4491 |
4492 | 4492 |
4493 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 4493 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
4494 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { | 4494 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { |
4495 public: | 4495 public: |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4663 // TODO(3095996): Put a valid pointer value in the stack slot where the | 4663 // TODO(3095996): Put a valid pointer value in the stack slot where the |
4664 // result register is stored, as this register is in the pointer map, but | 4664 // result register is stored, as this register is in the pointer map, but |
4665 // contains an integer value. | 4665 // contains an integer value. |
4666 __ mov(dst, zero_reg); | 4666 __ mov(dst, zero_reg); |
4667 | 4667 |
4668 // Preserve the value of all registers. | 4668 // Preserve the value of all registers. |
4669 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4669 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
4670 | 4670 |
4671 // NumberTagI and NumberTagD use the context from the frame, rather than | 4671 // NumberTagI and NumberTagD use the context from the frame, rather than |
4672 // the environment's HContext or HInlinedContext value. | 4672 // the environment's HContext or HInlinedContext value. |
4673 // They only call Runtime::kHiddenAllocateHeapNumber. | 4673 // They only call Runtime::kAllocateHeapNumber. |
4674 // The corresponding HChange instructions are added in a phase that does | 4674 // The corresponding HChange instructions are added in a phase that does |
4675 // not have easy access to the local context. | 4675 // not have easy access to the local context. |
4676 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4676 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4677 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4677 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4678 RecordSafepointWithRegisters( | 4678 RecordSafepointWithRegisters( |
4679 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4679 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
4680 __ Subu(v0, v0, kHeapObjectTag); | 4680 __ Subu(v0, v0, kHeapObjectTag); |
4681 __ StoreToSafepointRegisterSlot(v0, dst); | 4681 __ StoreToSafepointRegisterSlot(v0, dst); |
4682 } | 4682 } |
4683 | 4683 |
4684 | 4684 |
4685 // Done. Put the value in dbl_scratch into the value of the allocated heap | 4685 // Done. Put the value in dbl_scratch into the value of the allocated heap |
4686 // number. | 4686 // number. |
4687 __ bind(&done); | 4687 __ bind(&done); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4728 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { | 4728 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { |
4729 // TODO(3095996): Get rid of this. For now, we need to make the | 4729 // TODO(3095996): Get rid of this. For now, we need to make the |
4730 // result register contain a valid pointer because it is already | 4730 // result register contain a valid pointer because it is already |
4731 // contained in the register pointer map. | 4731 // contained in the register pointer map. |
4732 Register reg = ToRegister(instr->result()); | 4732 Register reg = ToRegister(instr->result()); |
4733 __ mov(reg, zero_reg); | 4733 __ mov(reg, zero_reg); |
4734 | 4734 |
4735 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4735 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
4736 // NumberTagI and NumberTagD use the context from the frame, rather than | 4736 // NumberTagI and NumberTagD use the context from the frame, rather than |
4737 // the environment's HContext or HInlinedContext value. | 4737 // the environment's HContext or HInlinedContext value. |
4738 // They only call Runtime::kHiddenAllocateHeapNumber. | 4738 // They only call Runtime::kAllocateHeapNumber. |
4739 // The corresponding HChange instructions are added in a phase that does | 4739 // The corresponding HChange instructions are added in a phase that does |
4740 // not have easy access to the local context. | 4740 // not have easy access to the local context. |
4741 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4741 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4742 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4742 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4743 RecordSafepointWithRegisters( | 4743 RecordSafepointWithRegisters( |
4744 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4744 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
4745 __ Subu(v0, v0, kHeapObjectTag); | 4745 __ Subu(v0, v0, kHeapObjectTag); |
4746 __ StoreToSafepointRegisterSlot(v0, reg); | 4746 __ StoreToSafepointRegisterSlot(v0, reg); |
4747 } | 4747 } |
4748 | 4748 |
4749 | 4749 |
4750 void LCodeGen::DoSmiTag(LSmiTag* instr) { | 4750 void LCodeGen::DoSmiTag(LSmiTag* instr) { |
4751 HChange* hchange = instr->hydrogen(); | 4751 HChange* hchange = instr->hydrogen(); |
4752 Register input = ToRegister(instr->value()); | 4752 Register input = ToRegister(instr->value()); |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5355 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); | 5355 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
5356 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5356 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
5357 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5357 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5358 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); | 5358 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
5359 } else { | 5359 } else { |
5360 flags = AllocateTargetSpace::update(flags, NEW_SPACE); | 5360 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
5361 } | 5361 } |
5362 __ Push(Smi::FromInt(flags)); | 5362 __ Push(Smi::FromInt(flags)); |
5363 | 5363 |
5364 CallRuntimeFromDeferred( | 5364 CallRuntimeFromDeferred( |
5365 Runtime::kHiddenAllocateInTargetSpace, 2, instr, instr->context()); | 5365 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
5366 __ StoreToSafepointRegisterSlot(v0, result); | 5366 __ StoreToSafepointRegisterSlot(v0, result); |
5367 } | 5367 } |
5368 | 5368 |
5369 | 5369 |
5370 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 5370 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
5371 ASSERT(ToRegister(instr->value()).is(a0)); | 5371 ASSERT(ToRegister(instr->value()).is(a0)); |
5372 ASSERT(ToRegister(instr->result()).is(v0)); | 5372 ASSERT(ToRegister(instr->result()).is(v0)); |
5373 __ push(a0); | 5373 __ push(a0); |
5374 CallRuntime(Runtime::kToFastProperties, 1, instr); | 5374 CallRuntime(Runtime::kToFastProperties, 1, instr); |
5375 } | 5375 } |
(...skipping 13 matching lines...) Expand all Loading... |
5389 __ lw(a1, FieldMemOperand(t3, literal_offset)); | 5389 __ lw(a1, FieldMemOperand(t3, literal_offset)); |
5390 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5390 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
5391 __ Branch(&materialized, ne, a1, Operand(at)); | 5391 __ Branch(&materialized, ne, a1, Operand(at)); |
5392 | 5392 |
5393 // Create regexp literal using runtime function | 5393 // Create regexp literal using runtime function |
5394 // Result will be in v0. | 5394 // Result will be in v0. |
5395 __ li(t2, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5395 __ li(t2, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); |
5396 __ li(t1, Operand(instr->hydrogen()->pattern())); | 5396 __ li(t1, Operand(instr->hydrogen()->pattern())); |
5397 __ li(t0, Operand(instr->hydrogen()->flags())); | 5397 __ li(t0, Operand(instr->hydrogen()->flags())); |
5398 __ Push(t3, t2, t1, t0); | 5398 __ Push(t3, t2, t1, t0); |
5399 CallRuntime(Runtime::kHiddenMaterializeRegExpLiteral, 4, instr); | 5399 CallRuntime(Runtime::kMaterializeRegExpLiteral, 4, instr); |
5400 __ mov(a1, v0); | 5400 __ mov(a1, v0); |
5401 | 5401 |
5402 __ bind(&materialized); | 5402 __ bind(&materialized); |
5403 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; | 5403 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
5404 Label allocated, runtime_allocate; | 5404 Label allocated, runtime_allocate; |
5405 | 5405 |
5406 __ Allocate(size, v0, a2, a3, &runtime_allocate, TAG_OBJECT); | 5406 __ Allocate(size, v0, a2, a3, &runtime_allocate, TAG_OBJECT); |
5407 __ jmp(&allocated); | 5407 __ jmp(&allocated); |
5408 | 5408 |
5409 __ bind(&runtime_allocate); | 5409 __ bind(&runtime_allocate); |
5410 __ li(a0, Operand(Smi::FromInt(size))); | 5410 __ li(a0, Operand(Smi::FromInt(size))); |
5411 __ Push(a1, a0); | 5411 __ Push(a1, a0); |
5412 CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1, instr); | 5412 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); |
5413 __ pop(a1); | 5413 __ pop(a1); |
5414 | 5414 |
5415 __ bind(&allocated); | 5415 __ bind(&allocated); |
5416 // Copy the content into the newly allocated memory. | 5416 // Copy the content into the newly allocated memory. |
5417 // (Unroll copy loop once for better throughput). | 5417 // (Unroll copy loop once for better throughput). |
5418 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { | 5418 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { |
5419 __ lw(a3, FieldMemOperand(a1, i)); | 5419 __ lw(a3, FieldMemOperand(a1, i)); |
5420 __ lw(a2, FieldMemOperand(a1, i + kPointerSize)); | 5420 __ lw(a2, FieldMemOperand(a1, i + kPointerSize)); |
5421 __ sw(a3, FieldMemOperand(v0, i)); | 5421 __ sw(a3, FieldMemOperand(v0, i)); |
5422 __ sw(a2, FieldMemOperand(v0, i + kPointerSize)); | 5422 __ sw(a2, FieldMemOperand(v0, i + kPointerSize)); |
(...skipping 14 matching lines...) Expand all Loading... |
5437 FastNewClosureStub stub(isolate(), | 5437 FastNewClosureStub stub(isolate(), |
5438 instr->hydrogen()->strict_mode(), | 5438 instr->hydrogen()->strict_mode(), |
5439 instr->hydrogen()->is_generator()); | 5439 instr->hydrogen()->is_generator()); |
5440 __ li(a2, Operand(instr->hydrogen()->shared_info())); | 5440 __ li(a2, Operand(instr->hydrogen()->shared_info())); |
5441 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5441 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5442 } else { | 5442 } else { |
5443 __ li(a2, Operand(instr->hydrogen()->shared_info())); | 5443 __ li(a2, Operand(instr->hydrogen()->shared_info())); |
5444 __ li(a1, Operand(pretenure ? factory()->true_value() | 5444 __ li(a1, Operand(pretenure ? factory()->true_value() |
5445 : factory()->false_value())); | 5445 : factory()->false_value())); |
5446 __ Push(cp, a2, a1); | 5446 __ Push(cp, a2, a1); |
5447 CallRuntime(Runtime::kHiddenNewClosure, 3, instr); | 5447 CallRuntime(Runtime::kNewClosure, 3, instr); |
5448 } | 5448 } |
5449 } | 5449 } |
5450 | 5450 |
5451 | 5451 |
5452 void LCodeGen::DoTypeof(LTypeof* instr) { | 5452 void LCodeGen::DoTypeof(LTypeof* instr) { |
5453 ASSERT(ToRegister(instr->result()).is(v0)); | 5453 ASSERT(ToRegister(instr->result()).is(v0)); |
5454 Register input = ToRegister(instr->value()); | 5454 Register input = ToRegister(instr->value()); |
5455 __ push(input); | 5455 __ push(input); |
5456 CallRuntime(Runtime::kTypeof, 1, instr); | 5456 CallRuntime(Runtime::kTypeof, 1, instr); |
5457 } | 5457 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5663 | 5663 |
5664 | 5664 |
5665 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 5665 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
5666 // Nothing to see here, move on! | 5666 // Nothing to see here, move on! |
5667 } | 5667 } |
5668 | 5668 |
5669 | 5669 |
5670 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 5670 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
5671 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5671 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
5672 LoadContextFromDeferred(instr->context()); | 5672 LoadContextFromDeferred(instr->context()); |
5673 __ CallRuntimeSaveDoubles(Runtime::kHiddenStackGuard); | 5673 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); |
5674 RecordSafepointWithLazyDeopt( | 5674 RecordSafepointWithLazyDeopt( |
5675 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 5675 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
5676 ASSERT(instr->HasEnvironment()); | 5676 ASSERT(instr->HasEnvironment()); |
5677 LEnvironment* env = instr->environment(); | 5677 LEnvironment* env = instr->environment(); |
5678 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5678 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
5679 } | 5679 } |
5680 | 5680 |
5681 | 5681 |
5682 void LCodeGen::DoStackCheck(LStackCheck* instr) { | 5682 void LCodeGen::DoStackCheck(LStackCheck* instr) { |
5683 class DeferredStackCheck V8_FINAL : public LDeferredCode { | 5683 class DeferredStackCheck V8_FINAL : public LDeferredCode { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5883 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5883 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
5884 Register context = ToRegister(instr->context()); | 5884 Register context = ToRegister(instr->context()); |
5885 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5885 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
5886 } | 5886 } |
5887 | 5887 |
5888 | 5888 |
5889 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { | 5889 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { |
5890 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5890 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5891 __ li(at, scope_info); | 5891 __ li(at, scope_info); |
5892 __ Push(at, ToRegister(instr->function())); | 5892 __ Push(at, ToRegister(instr->function())); |
5893 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5893 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5894 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5894 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5895 } | 5895 } |
5896 | 5896 |
5897 | 5897 |
5898 #undef __ | 5898 #undef __ |
5899 | 5899 |
5900 } } // namespace v8::internal | 5900 } } // namespace v8::internal |
OLD | NEW |