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

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

Issue 23697002: Implement proper map checks of captured objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. Created 7 years, 3 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/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.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 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
5102 DeoptimizeIf(tag == 0 ? ne : eq, instr->environment(), 5102 DeoptimizeIf(tag == 0 ? ne : eq, instr->environment(),
5103 at, Operand(zero_reg)); 5103 at, Operand(zero_reg));
5104 } else { 5104 } else {
5105 __ And(scratch, scratch, Operand(mask)); 5105 __ And(scratch, scratch, Operand(mask));
5106 DeoptimizeIf(ne, instr->environment(), scratch, Operand(tag)); 5106 DeoptimizeIf(ne, instr->environment(), scratch, Operand(tag));
5107 } 5107 }
5108 } 5108 }
5109 } 5109 }
5110 5110
5111 5111
5112 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5112 void LCodeGen::DoCheckValue(LCheckValue* instr) {
5113 Register reg = ToRegister(instr->value()); 5113 Register reg = ToRegister(instr->value());
5114 Handle<JSFunction> target = instr->hydrogen()->target(); 5114 Handle<HeapObject> object = instr->hydrogen()->object();
5115 AllowDeferredHandleDereference smi_check; 5115 AllowDeferredHandleDereference smi_check;
5116 if (isolate()->heap()->InNewSpace(*target)) { 5116 if (isolate()->heap()->InNewSpace(*object)) {
5117 Register reg = ToRegister(instr->value()); 5117 Register reg = ToRegister(instr->value());
5118 Handle<Cell> cell = isolate()->factory()->NewCell(target); 5118 Handle<Cell> cell = isolate()->factory()->NewCell(object);
5119 __ li(at, Operand(Handle<Object>(cell))); 5119 __ li(at, Operand(Handle<Object>(cell)));
5120 __ lw(at, FieldMemOperand(at, Cell::kValueOffset)); 5120 __ lw(at, FieldMemOperand(at, Cell::kValueOffset));
5121 DeoptimizeIf(ne, instr->environment(), reg, 5121 DeoptimizeIf(ne, instr->environment(), reg,
5122 Operand(at)); 5122 Operand(at));
5123 } else { 5123 } else {
5124 DeoptimizeIf(ne, instr->environment(), reg, 5124 DeoptimizeIf(ne, instr->environment(), reg,
5125 Operand(target)); 5125 Operand(object));
5126 } 5126 }
5127 } 5127 }
5128 5128
5129 5129
5130 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { 5130 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
5131 { 5131 {
5132 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); 5132 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
5133 __ push(object); 5133 __ push(object);
5134 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr); 5134 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr);
5135 __ StoreToSafepointRegisterSlot(v0, scratch0()); 5135 __ StoreToSafepointRegisterSlot(v0, scratch0());
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
5795 __ Subu(scratch, result, scratch); 5795 __ Subu(scratch, result, scratch);
5796 __ lw(result, FieldMemOperand(scratch, 5796 __ lw(result, FieldMemOperand(scratch,
5797 FixedArray::kHeaderSize - kPointerSize)); 5797 FixedArray::kHeaderSize - kPointerSize));
5798 __ bind(&done); 5798 __ bind(&done);
5799 } 5799 }
5800 5800
5801 5801
5802 #undef __ 5802 #undef __
5803 5803
5804 } } // namespace v8::internal 5804 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698