Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 194703008: Fix lazy deopt after tagged binary ops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comment Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 383
384 // Adjust the frame size, subsuming the unoptimized frame into the 384 // Adjust the frame size, subsuming the unoptimized frame into the
385 // optimized frame. 385 // optimized frame.
386 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); 386 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots();
387 ASSERT(slots >= 1); 387 ASSERT(slots >= 1);
388 __ sub(esp, Immediate((slots - 1) * kPointerSize)); 388 __ sub(esp, Immediate((slots - 1) * kPointerSize));
389 } 389 }
390 390
391 391
392 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { 392 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) {
393 if (!instr->IsLazyBailout() && !instr->IsGap()) {
394 safepoints_.BumpLastLazySafepointIndex();
395 }
393 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr); 396 if (!CpuFeatures::IsSupported(SSE2)) FlushX87StackIfNecessary(instr);
394 } 397 }
395 398
396 399
397 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) { 400 void LCodeGen::GenerateBodyInstructionPost(LInstruction* instr) {
398 if (!CpuFeatures::IsSupported(SSE2)) { 401 if (!CpuFeatures::IsSupported(SSE2)) {
399 if (instr->IsGoto()) { 402 if (instr->IsGoto()) {
400 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr)); 403 x87_stack_.LeavingBlock(current_block_, LGoto::cast(instr));
401 } else if (FLAG_debug_code && FLAG_enable_slow_asserts && 404 } else if (FLAG_debug_code && FLAG_enable_slow_asserts &&
402 !instr->IsGap() && !instr->IsReturn()) { 405 !instr->IsGap() && !instr->IsReturn()) {
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 2281
2279 2282
2280 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2283 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2281 ASSERT(ToRegister(instr->context()).is(esi)); 2284 ASSERT(ToRegister(instr->context()).is(esi));
2282 ASSERT(ToRegister(instr->left()).is(edx)); 2285 ASSERT(ToRegister(instr->left()).is(edx));
2283 ASSERT(ToRegister(instr->right()).is(eax)); 2286 ASSERT(ToRegister(instr->right()).is(eax));
2284 ASSERT(ToRegister(instr->result()).is(eax)); 2287 ASSERT(ToRegister(instr->result()).is(eax));
2285 2288
2286 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); 2289 BinaryOpICStub stub(instr->op(), NO_OVERWRITE);
2287 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 2290 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
2288 __ nop(); // Signals no inlined code.
2289 } 2291 }
2290 2292
2291 2293
2292 template<class InstrType> 2294 template<class InstrType>
2293 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { 2295 void LCodeGen::EmitBranch(InstrType instr, Condition cc) {
2294 int left_block = instr->TrueDestination(chunk_); 2296 int left_block = instr->TrueDestination(chunk_);
2295 int right_block = instr->FalseDestination(chunk_); 2297 int right_block = instr->FalseDestination(chunk_);
2296 2298
2297 int next_block = GetNextEmittedBlock(); 2299 int next_block = GetNextEmittedBlock();
2298 2300
(...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after
6343 FixedArray::kHeaderSize - kPointerSize)); 6345 FixedArray::kHeaderSize - kPointerSize));
6344 __ bind(&done); 6346 __ bind(&done);
6345 } 6347 }
6346 6348
6347 6349
6348 #undef __ 6350 #undef __
6349 6351
6350 } } // namespace v8::internal 6352 } } // namespace v8::internal
6351 6353
6352 #endif // V8_TARGET_ARCH_IA32 6354 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698