| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 Comment(";;; Allocate local context"); | 223 Comment(";;; Allocate local context"); |
| 224 bool need_write_barrier = true; | 224 bool need_write_barrier = true; |
| 225 // Argument to NewContext is the function, which is still in edi. | 225 // Argument to NewContext is the function, which is still in edi. |
| 226 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 226 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
| 227 FastNewContextStub stub(isolate(), heap_slots); | 227 FastNewContextStub stub(isolate(), heap_slots); |
| 228 __ CallStub(&stub); | 228 __ CallStub(&stub); |
| 229 // Result of FastNewContextStub is always in new space. | 229 // Result of FastNewContextStub is always in new space. |
| 230 need_write_barrier = false; | 230 need_write_barrier = false; |
| 231 } else { | 231 } else { |
| 232 __ push(edi); | 232 __ push(edi); |
| 233 __ CallRuntime(Runtime::kHiddenNewFunctionContext, 1); | 233 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
| 234 } | 234 } |
| 235 RecordSafepoint(Safepoint::kNoLazyDeopt); | 235 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 236 // Context is returned in eax. It replaces the context passed to us. | 236 // Context is returned in eax. It replaces the context passed to us. |
| 237 // It's saved in the stack and kept live in esi. | 237 // It's saved in the stack and kept live in esi. |
| 238 __ mov(esi, eax); | 238 __ mov(esi, eax); |
| 239 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); | 239 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); |
| 240 | 240 |
| 241 // Copy parameters into context if necessary. | 241 // Copy parameters into context if necessary. |
| 242 int num_parameters = scope()->num_parameters(); | 242 int num_parameters = scope()->num_parameters(); |
| 243 for (int i = 0; i < num_parameters; i++) { | 243 for (int i = 0; i < num_parameters; i++) { |
| (...skipping 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3516 ASSERT(result.is(esi)); | 3516 ASSERT(result.is(esi)); |
| 3517 } | 3517 } |
| 3518 } | 3518 } |
| 3519 | 3519 |
| 3520 | 3520 |
| 3521 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3521 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
| 3522 ASSERT(ToRegister(instr->context()).is(esi)); | 3522 ASSERT(ToRegister(instr->context()).is(esi)); |
| 3523 __ push(esi); // The context is the first argument. | 3523 __ push(esi); // The context is the first argument. |
| 3524 __ push(Immediate(instr->hydrogen()->pairs())); | 3524 __ push(Immediate(instr->hydrogen()->pairs())); |
| 3525 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3525 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
| 3526 CallRuntime(Runtime::kHiddenDeclareGlobals, 3, instr); | 3526 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
| 3527 } | 3527 } |
| 3528 | 3528 |
| 3529 | 3529 |
| 3530 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3530 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
| 3531 int formal_parameter_count, | 3531 int formal_parameter_count, |
| 3532 int arity, | 3532 int arity, |
| 3533 LInstruction* instr, | 3533 LInstruction* instr, |
| 3534 EDIState edi_state) { | 3534 EDIState edi_state) { |
| 3535 bool dont_adapt_arguments = | 3535 bool dont_adapt_arguments = |
| 3536 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3536 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3640 // |result| are the same register and |input| will be restored | 3640 // |result| are the same register and |input| will be restored |
| 3641 // unchanged by popping safepoint registers. | 3641 // unchanged by popping safepoint registers. |
| 3642 __ test(tmp, Immediate(HeapNumber::kSignMask)); | 3642 __ test(tmp, Immediate(HeapNumber::kSignMask)); |
| 3643 __ j(zero, &done, Label::kNear); | 3643 __ j(zero, &done, Label::kNear); |
| 3644 | 3644 |
| 3645 __ AllocateHeapNumber(tmp, tmp2, no_reg, &slow); | 3645 __ AllocateHeapNumber(tmp, tmp2, no_reg, &slow); |
| 3646 __ jmp(&allocated, Label::kNear); | 3646 __ jmp(&allocated, Label::kNear); |
| 3647 | 3647 |
| 3648 // Slow case: Call the runtime system to do the number allocation. | 3648 // Slow case: Call the runtime system to do the number allocation. |
| 3649 __ bind(&slow); | 3649 __ bind(&slow); |
| 3650 CallRuntimeFromDeferred(Runtime::kHiddenAllocateHeapNumber, 0, | 3650 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, |
| 3651 instr, instr->context()); | 3651 instr, instr->context()); |
| 3652 // Set the pointer to the new heap number in tmp. | 3652 // Set the pointer to the new heap number in tmp. |
| 3653 if (!tmp.is(eax)) __ mov(tmp, eax); | 3653 if (!tmp.is(eax)) __ mov(tmp, eax); |
| 3654 // Restore input_reg after call to runtime. | 3654 // Restore input_reg after call to runtime. |
| 3655 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); | 3655 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); |
| 3656 | 3656 |
| 3657 __ bind(&allocated); | 3657 __ bind(&allocated); |
| 3658 __ mov(tmp2, FieldOperand(input_reg, HeapNumber::kExponentOffset)); | 3658 __ mov(tmp2, FieldOperand(input_reg, HeapNumber::kExponentOffset)); |
| 3659 __ and_(tmp2, ~HeapNumber::kSignMask); | 3659 __ and_(tmp2, ~HeapNumber::kSignMask); |
| 3660 __ mov(FieldOperand(tmp, HeapNumber::kExponentOffset), tmp2); | 3660 __ mov(FieldOperand(tmp, HeapNumber::kExponentOffset), tmp2); |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4278 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); | 4278 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); |
| 4279 if (instr->index()->IsConstantOperand()) { | 4279 if (instr->index()->IsConstantOperand()) { |
| 4280 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), | 4280 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), |
| 4281 Representation::Smi()); | 4281 Representation::Smi()); |
| 4282 __ push(immediate); | 4282 __ push(immediate); |
| 4283 } else { | 4283 } else { |
| 4284 Register index = ToRegister(instr->index()); | 4284 Register index = ToRegister(instr->index()); |
| 4285 __ SmiTag(index); | 4285 __ SmiTag(index); |
| 4286 __ push(index); | 4286 __ push(index); |
| 4287 } | 4287 } |
| 4288 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, | 4288 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, |
| 4289 instr, instr->context()); | 4289 instr, instr->context()); |
| 4290 __ AssertSmi(eax); | 4290 __ AssertSmi(eax); |
| 4291 __ SmiUntag(eax); | 4291 __ SmiUntag(eax); |
| 4292 __ StoreToSafepointRegisterSlot(result, eax); | 4292 __ StoreToSafepointRegisterSlot(result, eax); |
| 4293 } | 4293 } |
| 4294 | 4294 |
| 4295 | 4295 |
| 4296 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 4296 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
| 4297 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { | 4297 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { |
| 4298 public: | 4298 public: |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4477 // TODO(3095996): Put a valid pointer value in the stack slot where the | 4477 // TODO(3095996): Put a valid pointer value in the stack slot where the |
| 4478 // result register is stored, as this register is in the pointer map, but | 4478 // result register is stored, as this register is in the pointer map, but |
| 4479 // contains an integer value. | 4479 // contains an integer value. |
| 4480 __ Move(reg, Immediate(0)); | 4480 __ Move(reg, Immediate(0)); |
| 4481 | 4481 |
| 4482 // Preserve the value of all registers. | 4482 // Preserve the value of all registers. |
| 4483 PushSafepointRegistersScope scope(this); | 4483 PushSafepointRegistersScope scope(this); |
| 4484 | 4484 |
| 4485 // NumberTagI and NumberTagD use the context from the frame, rather than | 4485 // NumberTagI and NumberTagD use the context from the frame, rather than |
| 4486 // the environment's HContext or HInlinedContext value. | 4486 // the environment's HContext or HInlinedContext value. |
| 4487 // They only call Runtime::kHiddenAllocateHeapNumber. | 4487 // They only call Runtime::kAllocateHeapNumber. |
| 4488 // The corresponding HChange instructions are added in a phase that does | 4488 // The corresponding HChange instructions are added in a phase that does |
| 4489 // not have easy access to the local context. | 4489 // not have easy access to the local context. |
| 4490 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4490 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 4491 __ CallRuntime(Runtime::kHiddenAllocateHeapNumber); | 4491 __ CallRuntime(Runtime::kAllocateHeapNumber); |
| 4492 RecordSafepointWithRegisters( | 4492 RecordSafepointWithRegisters( |
| 4493 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4493 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
| 4494 __ StoreToSafepointRegisterSlot(reg, eax); | 4494 __ StoreToSafepointRegisterSlot(reg, eax); |
| 4495 } | 4495 } |
| 4496 | 4496 |
| 4497 __ bind(&done); | 4497 __ bind(&done); |
| 4498 __ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset)); | 4498 __ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset)); |
| 4499 } | 4499 } |
| 4500 | 4500 |
| 4501 | 4501 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4536 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { | 4536 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { |
| 4537 // TODO(3095996): Get rid of this. For now, we need to make the | 4537 // TODO(3095996): Get rid of this. For now, we need to make the |
| 4538 // result register contain a valid pointer because it is already | 4538 // result register contain a valid pointer because it is already |
| 4539 // contained in the register pointer map. | 4539 // contained in the register pointer map. |
| 4540 Register reg = ToRegister(instr->result()); | 4540 Register reg = ToRegister(instr->result()); |
| 4541 __ Move(reg, Immediate(0)); | 4541 __ Move(reg, Immediate(0)); |
| 4542 | 4542 |
| 4543 PushSafepointRegistersScope scope(this); | 4543 PushSafepointRegistersScope scope(this); |
| 4544 // NumberTagI and NumberTagD use the context from the frame, rather than | 4544 // NumberTagI and NumberTagD use the context from the frame, rather than |
| 4545 // the environment's HContext or HInlinedContext value. | 4545 // the environment's HContext or HInlinedContext value. |
| 4546 // They only call Runtime::kHiddenAllocateHeapNumber. | 4546 // They only call Runtime::kAllocateHeapNumber. |
| 4547 // The corresponding HChange instructions are added in a phase that does | 4547 // The corresponding HChange instructions are added in a phase that does |
| 4548 // not have easy access to the local context. | 4548 // not have easy access to the local context. |
| 4549 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4549 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 4550 __ CallRuntime(Runtime::kHiddenAllocateHeapNumber); | 4550 __ CallRuntime(Runtime::kAllocateHeapNumber); |
| 4551 RecordSafepointWithRegisters( | 4551 RecordSafepointWithRegisters( |
| 4552 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4552 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
| 4553 __ StoreToSafepointRegisterSlot(reg, eax); | 4553 __ StoreToSafepointRegisterSlot(reg, eax); |
| 4554 } | 4554 } |
| 4555 | 4555 |
| 4556 | 4556 |
| 4557 void LCodeGen::DoSmiTag(LSmiTag* instr) { | 4557 void LCodeGen::DoSmiTag(LSmiTag* instr) { |
| 4558 HChange* hchange = instr->hydrogen(); | 4558 HChange* hchange = instr->hydrogen(); |
| 4559 Register input = ToRegister(instr->value()); | 4559 Register input = ToRegister(instr->value()); |
| 4560 if (hchange->CheckFlag(HValue::kCanOverflow) && | 4560 if (hchange->CheckFlag(HValue::kCanOverflow) && |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5206 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); | 5206 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
| 5207 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5207 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
| 5208 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5208 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5209 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); | 5209 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
| 5210 } else { | 5210 } else { |
| 5211 flags = AllocateTargetSpace::update(flags, NEW_SPACE); | 5211 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
| 5212 } | 5212 } |
| 5213 __ push(Immediate(Smi::FromInt(flags))); | 5213 __ push(Immediate(Smi::FromInt(flags))); |
| 5214 | 5214 |
| 5215 CallRuntimeFromDeferred( | 5215 CallRuntimeFromDeferred( |
| 5216 Runtime::kHiddenAllocateInTargetSpace, 2, instr, instr->context()); | 5216 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
| 5217 __ StoreToSafepointRegisterSlot(result, eax); | 5217 __ StoreToSafepointRegisterSlot(result, eax); |
| 5218 } | 5218 } |
| 5219 | 5219 |
| 5220 | 5220 |
| 5221 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 5221 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
| 5222 ASSERT(ToRegister(instr->value()).is(eax)); | 5222 ASSERT(ToRegister(instr->value()).is(eax)); |
| 5223 __ push(eax); | 5223 __ push(eax); |
| 5224 CallRuntime(Runtime::kToFastProperties, 1, instr); | 5224 CallRuntime(Runtime::kToFastProperties, 1, instr); |
| 5225 } | 5225 } |
| 5226 | 5226 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 5239 __ mov(ebx, FieldOperand(ecx, literal_offset)); | 5239 __ mov(ebx, FieldOperand(ecx, literal_offset)); |
| 5240 __ cmp(ebx, factory()->undefined_value()); | 5240 __ cmp(ebx, factory()->undefined_value()); |
| 5241 __ j(not_equal, &materialized, Label::kNear); | 5241 __ j(not_equal, &materialized, Label::kNear); |
| 5242 | 5242 |
| 5243 // Create regexp literal using runtime function | 5243 // Create regexp literal using runtime function |
| 5244 // Result will be in eax. | 5244 // Result will be in eax. |
| 5245 __ push(ecx); | 5245 __ push(ecx); |
| 5246 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5246 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); |
| 5247 __ push(Immediate(instr->hydrogen()->pattern())); | 5247 __ push(Immediate(instr->hydrogen()->pattern())); |
| 5248 __ push(Immediate(instr->hydrogen()->flags())); | 5248 __ push(Immediate(instr->hydrogen()->flags())); |
| 5249 CallRuntime(Runtime::kHiddenMaterializeRegExpLiteral, 4, instr); | 5249 CallRuntime(Runtime::kMaterializeRegExpLiteral, 4, instr); |
| 5250 __ mov(ebx, eax); | 5250 __ mov(ebx, eax); |
| 5251 | 5251 |
| 5252 __ bind(&materialized); | 5252 __ bind(&materialized); |
| 5253 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; | 5253 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
| 5254 Label allocated, runtime_allocate; | 5254 Label allocated, runtime_allocate; |
| 5255 __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); | 5255 __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
| 5256 __ jmp(&allocated, Label::kNear); | 5256 __ jmp(&allocated, Label::kNear); |
| 5257 | 5257 |
| 5258 __ bind(&runtime_allocate); | 5258 __ bind(&runtime_allocate); |
| 5259 __ push(ebx); | 5259 __ push(ebx); |
| 5260 __ push(Immediate(Smi::FromInt(size))); | 5260 __ push(Immediate(Smi::FromInt(size))); |
| 5261 CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1, instr); | 5261 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); |
| 5262 __ pop(ebx); | 5262 __ pop(ebx); |
| 5263 | 5263 |
| 5264 __ bind(&allocated); | 5264 __ bind(&allocated); |
| 5265 // Copy the content into the newly allocated memory. | 5265 // Copy the content into the newly allocated memory. |
| 5266 // (Unroll copy loop once for better throughput). | 5266 // (Unroll copy loop once for better throughput). |
| 5267 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { | 5267 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { |
| 5268 __ mov(edx, FieldOperand(ebx, i)); | 5268 __ mov(edx, FieldOperand(ebx, i)); |
| 5269 __ mov(ecx, FieldOperand(ebx, i + kPointerSize)); | 5269 __ mov(ecx, FieldOperand(ebx, i + kPointerSize)); |
| 5270 __ mov(FieldOperand(eax, i), edx); | 5270 __ mov(FieldOperand(eax, i), edx); |
| 5271 __ mov(FieldOperand(eax, i + kPointerSize), ecx); | 5271 __ mov(FieldOperand(eax, i + kPointerSize), ecx); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5286 FastNewClosureStub stub(isolate(), | 5286 FastNewClosureStub stub(isolate(), |
| 5287 instr->hydrogen()->strict_mode(), | 5287 instr->hydrogen()->strict_mode(), |
| 5288 instr->hydrogen()->is_generator()); | 5288 instr->hydrogen()->is_generator()); |
| 5289 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5289 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
| 5290 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5290 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 5291 } else { | 5291 } else { |
| 5292 __ push(esi); | 5292 __ push(esi); |
| 5293 __ push(Immediate(instr->hydrogen()->shared_info())); | 5293 __ push(Immediate(instr->hydrogen()->shared_info())); |
| 5294 __ push(Immediate(pretenure ? factory()->true_value() | 5294 __ push(Immediate(pretenure ? factory()->true_value() |
| 5295 : factory()->false_value())); | 5295 : factory()->false_value())); |
| 5296 CallRuntime(Runtime::kHiddenNewClosure, 3, instr); | 5296 CallRuntime(Runtime::kNewClosure, 3, instr); |
| 5297 } | 5297 } |
| 5298 } | 5298 } |
| 5299 | 5299 |
| 5300 | 5300 |
| 5301 void LCodeGen::DoTypeof(LTypeof* instr) { | 5301 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5302 ASSERT(ToRegister(instr->context()).is(esi)); | 5302 ASSERT(ToRegister(instr->context()).is(esi)); |
| 5303 LOperand* input = instr->value(); | 5303 LOperand* input = instr->value(); |
| 5304 EmitPushTaggedOperand(input); | 5304 EmitPushTaggedOperand(input); |
| 5305 CallRuntime(Runtime::kTypeof, 1, instr); | 5305 CallRuntime(Runtime::kTypeof, 1, instr); |
| 5306 } | 5306 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5467 | 5467 |
| 5468 | 5468 |
| 5469 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 5469 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
| 5470 // Nothing to see here, move on! | 5470 // Nothing to see here, move on! |
| 5471 } | 5471 } |
| 5472 | 5472 |
| 5473 | 5473 |
| 5474 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 5474 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
| 5475 PushSafepointRegistersScope scope(this); | 5475 PushSafepointRegistersScope scope(this); |
| 5476 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 5476 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 5477 __ CallRuntime(Runtime::kHiddenStackGuard); | 5477 __ CallRuntime(Runtime::kStackGuard); |
| 5478 RecordSafepointWithLazyDeopt( | 5478 RecordSafepointWithLazyDeopt( |
| 5479 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 5479 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| 5480 ASSERT(instr->HasEnvironment()); | 5480 ASSERT(instr->HasEnvironment()); |
| 5481 LEnvironment* env = instr->environment(); | 5481 LEnvironment* env = instr->environment(); |
| 5482 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5482 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 5483 } | 5483 } |
| 5484 | 5484 |
| 5485 | 5485 |
| 5486 void LCodeGen::DoStackCheck(LStackCheck* instr) { | 5486 void LCodeGen::DoStackCheck(LStackCheck* instr) { |
| 5487 class DeferredStackCheck V8_FINAL : public LDeferredCode { | 5487 class DeferredStackCheck V8_FINAL : public LDeferredCode { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5688 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5688 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5689 Register context = ToRegister(instr->context()); | 5689 Register context = ToRegister(instr->context()); |
| 5690 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); | 5690 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); |
| 5691 } | 5691 } |
| 5692 | 5692 |
| 5693 | 5693 |
| 5694 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { | 5694 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { |
| 5695 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5695 Handle<ScopeInfo> scope_info = instr->scope_info(); |
| 5696 __ Push(scope_info); | 5696 __ Push(scope_info); |
| 5697 __ push(ToRegister(instr->function())); | 5697 __ push(ToRegister(instr->function())); |
| 5698 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5699 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5699 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5700 } | 5700 } |
| 5701 | 5701 |
| 5702 | 5702 |
| 5703 #undef __ | 5703 #undef __ |
| 5704 | 5704 |
| 5705 } } // namespace v8::internal | 5705 } } // namespace v8::internal |
| 5706 | 5706 |
| 5707 #endif // V8_TARGET_ARCH_X87 | 5707 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |