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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 Comment(";;; Allocate local context"); | 256 Comment(";;; Allocate local context"); |
257 bool need_write_barrier = true; | 257 bool need_write_barrier = true; |
258 // Argument to NewContext is the function, which is still in edi. | 258 // Argument to NewContext is the function, which is still in edi. |
259 if (heap_slots <= FastNewContextStub::kMaximumSlots) { | 259 if (heap_slots <= FastNewContextStub::kMaximumSlots) { |
260 FastNewContextStub stub(isolate(), heap_slots); | 260 FastNewContextStub stub(isolate(), heap_slots); |
261 __ CallStub(&stub); | 261 __ CallStub(&stub); |
262 // Result of FastNewContextStub is always in new space. | 262 // Result of FastNewContextStub is always in new space. |
263 need_write_barrier = false; | 263 need_write_barrier = false; |
264 } else { | 264 } else { |
265 __ push(edi); | 265 __ push(edi); |
266 __ CallRuntime(Runtime::kHiddenNewFunctionContext, 1); | 266 __ CallRuntime(Runtime::kNewFunctionContext, 1); |
267 } | 267 } |
268 RecordSafepoint(Safepoint::kNoLazyDeopt); | 268 RecordSafepoint(Safepoint::kNoLazyDeopt); |
269 // Context is returned in eax. It replaces the context passed to us. | 269 // Context is returned in eax. It replaces the context passed to us. |
270 // It's saved in the stack and kept live in esi. | 270 // It's saved in the stack and kept live in esi. |
271 __ mov(esi, eax); | 271 __ mov(esi, eax); |
272 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); | 272 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); |
273 | 273 |
274 // Copy parameters into context if necessary. | 274 // Copy parameters into context if necessary. |
275 int num_parameters = scope()->num_parameters(); | 275 int num_parameters = scope()->num_parameters(); |
276 for (int i = 0; i < num_parameters; i++) { | 276 for (int i = 0; i < num_parameters; i++) { |
(...skipping 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3386 ASSERT(result.is(esi)); | 3386 ASSERT(result.is(esi)); |
3387 } | 3387 } |
3388 } | 3388 } |
3389 | 3389 |
3390 | 3390 |
3391 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3391 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3392 ASSERT(ToRegister(instr->context()).is(esi)); | 3392 ASSERT(ToRegister(instr->context()).is(esi)); |
3393 __ push(esi); // The context is the first argument. | 3393 __ push(esi); // The context is the first argument. |
3394 __ push(Immediate(instr->hydrogen()->pairs())); | 3394 __ push(Immediate(instr->hydrogen()->pairs())); |
3395 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3395 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
3396 CallRuntime(Runtime::kHiddenDeclareGlobals, 3, instr); | 3396 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
3397 } | 3397 } |
3398 | 3398 |
3399 | 3399 |
3400 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3400 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3401 int formal_parameter_count, | 3401 int formal_parameter_count, |
3402 int arity, | 3402 int arity, |
3403 LInstruction* instr, | 3403 LInstruction* instr, |
3404 EDIState edi_state) { | 3404 EDIState edi_state) { |
3405 bool dont_adapt_arguments = | 3405 bool dont_adapt_arguments = |
3406 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3406 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3510 // |result| are the same register and |input| will be restored | 3510 // |result| are the same register and |input| will be restored |
3511 // unchanged by popping safepoint registers. | 3511 // unchanged by popping safepoint registers. |
3512 __ test(tmp, Immediate(HeapNumber::kSignMask)); | 3512 __ test(tmp, Immediate(HeapNumber::kSignMask)); |
3513 __ j(zero, &done, Label::kNear); | 3513 __ j(zero, &done, Label::kNear); |
3514 | 3514 |
3515 __ AllocateHeapNumber(tmp, tmp2, no_reg, &slow); | 3515 __ AllocateHeapNumber(tmp, tmp2, no_reg, &slow); |
3516 __ jmp(&allocated, Label::kNear); | 3516 __ jmp(&allocated, Label::kNear); |
3517 | 3517 |
3518 // Slow case: Call the runtime system to do the number allocation. | 3518 // Slow case: Call the runtime system to do the number allocation. |
3519 __ bind(&slow); | 3519 __ bind(&slow); |
3520 CallRuntimeFromDeferred(Runtime::kHiddenAllocateHeapNumber, 0, | 3520 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, |
3521 instr, instr->context()); | 3521 instr, instr->context()); |
3522 // Set the pointer to the new heap number in tmp. | 3522 // Set the pointer to the new heap number in tmp. |
3523 if (!tmp.is(eax)) __ mov(tmp, eax); | 3523 if (!tmp.is(eax)) __ mov(tmp, eax); |
3524 // Restore input_reg after call to runtime. | 3524 // Restore input_reg after call to runtime. |
3525 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); | 3525 __ LoadFromSafepointRegisterSlot(input_reg, input_reg); |
3526 | 3526 |
3527 __ bind(&allocated); | 3527 __ bind(&allocated); |
3528 __ mov(tmp2, FieldOperand(input_reg, HeapNumber::kExponentOffset)); | 3528 __ mov(tmp2, FieldOperand(input_reg, HeapNumber::kExponentOffset)); |
3529 __ and_(tmp2, ~HeapNumber::kSignMask); | 3529 __ and_(tmp2, ~HeapNumber::kSignMask); |
3530 __ mov(FieldOperand(tmp, HeapNumber::kExponentOffset), tmp2); | 3530 __ mov(FieldOperand(tmp, HeapNumber::kExponentOffset), tmp2); |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4339 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); | 4339 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); |
4340 if (instr->index()->IsConstantOperand()) { | 4340 if (instr->index()->IsConstantOperand()) { |
4341 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), | 4341 Immediate immediate = ToImmediate(LConstantOperand::cast(instr->index()), |
4342 Representation::Smi()); | 4342 Representation::Smi()); |
4343 __ push(immediate); | 4343 __ push(immediate); |
4344 } else { | 4344 } else { |
4345 Register index = ToRegister(instr->index()); | 4345 Register index = ToRegister(instr->index()); |
4346 __ SmiTag(index); | 4346 __ SmiTag(index); |
4347 __ push(index); | 4347 __ push(index); |
4348 } | 4348 } |
4349 CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, | 4349 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, |
4350 instr, instr->context()); | 4350 instr, instr->context()); |
4351 __ AssertSmi(eax); | 4351 __ AssertSmi(eax); |
4352 __ SmiUntag(eax); | 4352 __ SmiUntag(eax); |
4353 __ StoreToSafepointRegisterSlot(result, eax); | 4353 __ StoreToSafepointRegisterSlot(result, eax); |
4354 } | 4354 } |
4355 | 4355 |
4356 | 4356 |
4357 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { | 4357 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { |
4358 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { | 4358 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { |
4359 public: | 4359 public: |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 // TODO(3095996): Put a valid pointer value in the stack slot where the | 4517 // TODO(3095996): Put a valid pointer value in the stack slot where the |
4518 // result register is stored, as this register is in the pointer map, but | 4518 // result register is stored, as this register is in the pointer map, but |
4519 // contains an integer value. | 4519 // contains an integer value. |
4520 __ Move(reg, Immediate(0)); | 4520 __ Move(reg, Immediate(0)); |
4521 | 4521 |
4522 // Preserve the value of all registers. | 4522 // Preserve the value of all registers. |
4523 PushSafepointRegistersScope scope(this); | 4523 PushSafepointRegistersScope scope(this); |
4524 | 4524 |
4525 // NumberTagI and NumberTagD use the context from the frame, rather than | 4525 // NumberTagI and NumberTagD use the context from the frame, rather than |
4526 // the environment's HContext or HInlinedContext value. | 4526 // the environment's HContext or HInlinedContext value. |
4527 // They only call Runtime::kHiddenAllocateHeapNumber. | 4527 // They only call Runtime::kAllocateHeapNumber. |
4528 // The corresponding HChange instructions are added in a phase that does | 4528 // The corresponding HChange instructions are added in a phase that does |
4529 // not have easy access to the local context. | 4529 // not have easy access to the local context. |
4530 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4530 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
4531 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4531 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4532 RecordSafepointWithRegisters( | 4532 RecordSafepointWithRegisters( |
4533 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4533 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
4534 __ StoreToSafepointRegisterSlot(reg, eax); | 4534 __ StoreToSafepointRegisterSlot(reg, eax); |
4535 } | 4535 } |
4536 | 4536 |
4537 // Done. Put the value in xmm_scratch into the value of the allocated heap | 4537 // Done. Put the value in xmm_scratch into the value of the allocated heap |
4538 // number. | 4538 // number. |
4539 __ bind(&done); | 4539 __ bind(&done); |
4540 __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), xmm_scratch); | 4540 __ movsd(FieldOperand(reg, HeapNumber::kValueOffset), xmm_scratch); |
4541 } | 4541 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4573 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { | 4573 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { |
4574 // TODO(3095996): Get rid of this. For now, we need to make the | 4574 // TODO(3095996): Get rid of this. For now, we need to make the |
4575 // result register contain a valid pointer because it is already | 4575 // result register contain a valid pointer because it is already |
4576 // contained in the register pointer map. | 4576 // contained in the register pointer map. |
4577 Register reg = ToRegister(instr->result()); | 4577 Register reg = ToRegister(instr->result()); |
4578 __ Move(reg, Immediate(0)); | 4578 __ Move(reg, Immediate(0)); |
4579 | 4579 |
4580 PushSafepointRegistersScope scope(this); | 4580 PushSafepointRegistersScope scope(this); |
4581 // NumberTagI and NumberTagD use the context from the frame, rather than | 4581 // NumberTagI and NumberTagD use the context from the frame, rather than |
4582 // the environment's HContext or HInlinedContext value. | 4582 // the environment's HContext or HInlinedContext value. |
4583 // They only call Runtime::kHiddenAllocateHeapNumber. | 4583 // They only call Runtime::kAllocateHeapNumber. |
4584 // The corresponding HChange instructions are added in a phase that does | 4584 // The corresponding HChange instructions are added in a phase that does |
4585 // not have easy access to the local context. | 4585 // not have easy access to the local context. |
4586 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 4586 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
4587 __ CallRuntimeSaveDoubles(Runtime::kHiddenAllocateHeapNumber); | 4587 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); |
4588 RecordSafepointWithRegisters( | 4588 RecordSafepointWithRegisters( |
4589 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4589 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
4590 __ StoreToSafepointRegisterSlot(reg, eax); | 4590 __ StoreToSafepointRegisterSlot(reg, eax); |
4591 } | 4591 } |
4592 | 4592 |
4593 | 4593 |
4594 void LCodeGen::DoSmiTag(LSmiTag* instr) { | 4594 void LCodeGen::DoSmiTag(LSmiTag* instr) { |
4595 HChange* hchange = instr->hydrogen(); | 4595 HChange* hchange = instr->hydrogen(); |
4596 Register input = ToRegister(instr->value()); | 4596 Register input = ToRegister(instr->value()); |
4597 if (hchange->CheckFlag(HValue::kCanOverflow) && | 4597 if (hchange->CheckFlag(HValue::kCanOverflow) && |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5173 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); | 5173 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
5174 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5174 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
5175 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5175 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5176 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); | 5176 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
5177 } else { | 5177 } else { |
5178 flags = AllocateTargetSpace::update(flags, NEW_SPACE); | 5178 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
5179 } | 5179 } |
5180 __ push(Immediate(Smi::FromInt(flags))); | 5180 __ push(Immediate(Smi::FromInt(flags))); |
5181 | 5181 |
5182 CallRuntimeFromDeferred( | 5182 CallRuntimeFromDeferred( |
5183 Runtime::kHiddenAllocateInTargetSpace, 2, instr, instr->context()); | 5183 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
5184 __ StoreToSafepointRegisterSlot(result, eax); | 5184 __ StoreToSafepointRegisterSlot(result, eax); |
5185 } | 5185 } |
5186 | 5186 |
5187 | 5187 |
5188 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 5188 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
5189 ASSERT(ToRegister(instr->value()).is(eax)); | 5189 ASSERT(ToRegister(instr->value()).is(eax)); |
5190 __ push(eax); | 5190 __ push(eax); |
5191 CallRuntime(Runtime::kToFastProperties, 1, instr); | 5191 CallRuntime(Runtime::kToFastProperties, 1, instr); |
5192 } | 5192 } |
5193 | 5193 |
(...skipping 12 matching lines...) Expand all Loading... |
5206 __ mov(ebx, FieldOperand(ecx, literal_offset)); | 5206 __ mov(ebx, FieldOperand(ecx, literal_offset)); |
5207 __ cmp(ebx, factory()->undefined_value()); | 5207 __ cmp(ebx, factory()->undefined_value()); |
5208 __ j(not_equal, &materialized, Label::kNear); | 5208 __ j(not_equal, &materialized, Label::kNear); |
5209 | 5209 |
5210 // Create regexp literal using runtime function | 5210 // Create regexp literal using runtime function |
5211 // Result will be in eax. | 5211 // Result will be in eax. |
5212 __ push(ecx); | 5212 __ push(ecx); |
5213 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5213 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); |
5214 __ push(Immediate(instr->hydrogen()->pattern())); | 5214 __ push(Immediate(instr->hydrogen()->pattern())); |
5215 __ push(Immediate(instr->hydrogen()->flags())); | 5215 __ push(Immediate(instr->hydrogen()->flags())); |
5216 CallRuntime(Runtime::kHiddenMaterializeRegExpLiteral, 4, instr); | 5216 CallRuntime(Runtime::kMaterializeRegExpLiteral, 4, instr); |
5217 __ mov(ebx, eax); | 5217 __ mov(ebx, eax); |
5218 | 5218 |
5219 __ bind(&materialized); | 5219 __ bind(&materialized); |
5220 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; | 5220 int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
5221 Label allocated, runtime_allocate; | 5221 Label allocated, runtime_allocate; |
5222 __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); | 5222 __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
5223 __ jmp(&allocated, Label::kNear); | 5223 __ jmp(&allocated, Label::kNear); |
5224 | 5224 |
5225 __ bind(&runtime_allocate); | 5225 __ bind(&runtime_allocate); |
5226 __ push(ebx); | 5226 __ push(ebx); |
5227 __ push(Immediate(Smi::FromInt(size))); | 5227 __ push(Immediate(Smi::FromInt(size))); |
5228 CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1, instr); | 5228 CallRuntime(Runtime::kAllocateInNewSpace, 1, instr); |
5229 __ pop(ebx); | 5229 __ pop(ebx); |
5230 | 5230 |
5231 __ bind(&allocated); | 5231 __ bind(&allocated); |
5232 // Copy the content into the newly allocated memory. | 5232 // Copy the content into the newly allocated memory. |
5233 // (Unroll copy loop once for better throughput). | 5233 // (Unroll copy loop once for better throughput). |
5234 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { | 5234 for (int i = 0; i < size - kPointerSize; i += 2 * kPointerSize) { |
5235 __ mov(edx, FieldOperand(ebx, i)); | 5235 __ mov(edx, FieldOperand(ebx, i)); |
5236 __ mov(ecx, FieldOperand(ebx, i + kPointerSize)); | 5236 __ mov(ecx, FieldOperand(ebx, i + kPointerSize)); |
5237 __ mov(FieldOperand(eax, i), edx); | 5237 __ mov(FieldOperand(eax, i), edx); |
5238 __ mov(FieldOperand(eax, i + kPointerSize), ecx); | 5238 __ mov(FieldOperand(eax, i + kPointerSize), ecx); |
(...skipping 14 matching lines...) Expand all Loading... |
5253 FastNewClosureStub stub(isolate(), | 5253 FastNewClosureStub stub(isolate(), |
5254 instr->hydrogen()->strict_mode(), | 5254 instr->hydrogen()->strict_mode(), |
5255 instr->hydrogen()->is_generator()); | 5255 instr->hydrogen()->is_generator()); |
5256 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); | 5256 __ mov(ebx, Immediate(instr->hydrogen()->shared_info())); |
5257 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5257 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
5258 } else { | 5258 } else { |
5259 __ push(esi); | 5259 __ push(esi); |
5260 __ push(Immediate(instr->hydrogen()->shared_info())); | 5260 __ push(Immediate(instr->hydrogen()->shared_info())); |
5261 __ push(Immediate(pretenure ? factory()->true_value() | 5261 __ push(Immediate(pretenure ? factory()->true_value() |
5262 : factory()->false_value())); | 5262 : factory()->false_value())); |
5263 CallRuntime(Runtime::kHiddenNewClosure, 3, instr); | 5263 CallRuntime(Runtime::kNewClosure, 3, instr); |
5264 } | 5264 } |
5265 } | 5265 } |
5266 | 5266 |
5267 | 5267 |
5268 void LCodeGen::DoTypeof(LTypeof* instr) { | 5268 void LCodeGen::DoTypeof(LTypeof* instr) { |
5269 ASSERT(ToRegister(instr->context()).is(esi)); | 5269 ASSERT(ToRegister(instr->context()).is(esi)); |
5270 LOperand* input = instr->value(); | 5270 LOperand* input = instr->value(); |
5271 EmitPushTaggedOperand(input); | 5271 EmitPushTaggedOperand(input); |
5272 CallRuntime(Runtime::kTypeof, 1, instr); | 5272 CallRuntime(Runtime::kTypeof, 1, instr); |
5273 } | 5273 } |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5434 | 5434 |
5435 | 5435 |
5436 void LCodeGen::DoDummyUse(LDummyUse* instr) { | 5436 void LCodeGen::DoDummyUse(LDummyUse* instr) { |
5437 // Nothing to see here, move on! | 5437 // Nothing to see here, move on! |
5438 } | 5438 } |
5439 | 5439 |
5440 | 5440 |
5441 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { | 5441 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { |
5442 PushSafepointRegistersScope scope(this); | 5442 PushSafepointRegistersScope scope(this); |
5443 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 5443 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
5444 __ CallRuntimeSaveDoubles(Runtime::kHiddenStackGuard); | 5444 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); |
5445 RecordSafepointWithLazyDeopt( | 5445 RecordSafepointWithLazyDeopt( |
5446 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); | 5446 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
5447 ASSERT(instr->HasEnvironment()); | 5447 ASSERT(instr->HasEnvironment()); |
5448 LEnvironment* env = instr->environment(); | 5448 LEnvironment* env = instr->environment(); |
5449 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5449 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
5450 } | 5450 } |
5451 | 5451 |
5452 | 5452 |
5453 void LCodeGen::DoStackCheck(LStackCheck* instr) { | 5453 void LCodeGen::DoStackCheck(LStackCheck* instr) { |
5454 class DeferredStackCheck V8_FINAL : public LDeferredCode { | 5454 class DeferredStackCheck V8_FINAL : public LDeferredCode { |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5652 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5652 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
5653 Register context = ToRegister(instr->context()); | 5653 Register context = ToRegister(instr->context()); |
5654 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); | 5654 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); |
5655 } | 5655 } |
5656 | 5656 |
5657 | 5657 |
5658 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { | 5658 void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) { |
5659 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5659 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5660 __ Push(scope_info); | 5660 __ Push(scope_info); |
5661 __ push(ToRegister(instr->function())); | 5661 __ push(ToRegister(instr->function())); |
5662 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5663 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5664 } | 5664 } |
5665 | 5665 |
5666 | 5666 |
5667 #undef __ | 5667 #undef __ |
5668 | 5668 |
5669 } } // namespace v8::internal | 5669 } } // namespace v8::internal |
5670 | 5670 |
5671 #endif // V8_TARGET_ARCH_IA32 | 5671 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |