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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-codegen-arm.h ('k') | src/deoptimizer.cc » ('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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 osr_pc_offset_ = masm()->pc_offset(); 262 osr_pc_offset_ = masm()->pc_offset();
263 263
264 // Adjust the frame size, subsuming the unoptimized frame into the 264 // Adjust the frame size, subsuming the unoptimized frame into the
265 // optimized frame. 265 // optimized frame.
266 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); 266 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots();
267 ASSERT(slots >= 0); 267 ASSERT(slots >= 0);
268 __ sub(sp, sp, Operand(slots * kPointerSize)); 268 __ sub(sp, sp, Operand(slots * kPointerSize));
269 } 269 }
270 270
271 271
272 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) {
273 if (!instr->IsLazyBailout() && !instr->IsGap()) {
274 safepoints_.BumpLastLazySafepointIndex();
275 }
276 }
277
278
272 bool LCodeGen::GenerateDeferredCode() { 279 bool LCodeGen::GenerateDeferredCode() {
273 ASSERT(is_generating()); 280 ASSERT(is_generating());
274 if (deferred_.length() > 0) { 281 if (deferred_.length() > 0) {
275 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 282 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
276 LDeferredCode* code = deferred_[i]; 283 LDeferredCode* code = deferred_[i];
277 284
278 HValue* value = 285 HValue* value =
279 instructions_->at(code->instruction_index())->hydrogen_value(); 286 instructions_->at(code->instruction_index())->hydrogen_value();
280 RecordAndWritePosition( 287 RecordAndWritePosition(
281 chunk()->graph()->SourcePositionToScriptPosition(value->position())); 288 chunk()->graph()->SourcePositionToScriptPosition(value->position()));
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 ASSERT(ToRegister(instr->context()).is(cp)); 2066 ASSERT(ToRegister(instr->context()).is(cp));
2060 ASSERT(ToRegister(instr->left()).is(r1)); 2067 ASSERT(ToRegister(instr->left()).is(r1));
2061 ASSERT(ToRegister(instr->right()).is(r0)); 2068 ASSERT(ToRegister(instr->right()).is(r0));
2062 ASSERT(ToRegister(instr->result()).is(r0)); 2069 ASSERT(ToRegister(instr->result()).is(r0));
2063 2070
2064 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); 2071 BinaryOpICStub stub(instr->op(), NO_OVERWRITE);
2065 // Block literal pool emission to ensure nop indicating no inlined smi code 2072 // Block literal pool emission to ensure nop indicating no inlined smi code
2066 // is in the correct position. 2073 // is in the correct position.
2067 Assembler::BlockConstPoolScope block_const_pool(masm()); 2074 Assembler::BlockConstPoolScope block_const_pool(masm());
2068 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 2075 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
2069 __ nop(); // Signals no inlined code.
2070 } 2076 }
2071 2077
2072 2078
2073 template<class InstrType> 2079 template<class InstrType>
2074 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { 2080 void LCodeGen::EmitBranch(InstrType instr, Condition condition) {
2075 int left_block = instr->TrueDestination(chunk_); 2081 int left_block = instr->TrueDestination(chunk_);
2076 int right_block = instr->FalseDestination(chunk_); 2082 int right_block = instr->FalseDestination(chunk_);
2077 2083
2078 int next_block = GetNextEmittedBlock(); 2084 int next_block = GetNextEmittedBlock();
2079 2085
(...skipping 3640 matching lines...) Expand 10 before | Expand all | Expand 10 after
5720 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5726 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5721 __ ldr(result, FieldMemOperand(scratch, 5727 __ ldr(result, FieldMemOperand(scratch,
5722 FixedArray::kHeaderSize - kPointerSize)); 5728 FixedArray::kHeaderSize - kPointerSize));
5723 __ bind(&done); 5729 __ bind(&done);
5724 } 5730 }
5725 5731
5726 5732
5727 #undef __ 5733 #undef __
5728 5734
5729 } } // namespace v8::internal 5735 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698