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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-arm.cc ('k') | src/hydrogen.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 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5118 DeoptimizeIf(tag == 0 ? ne : eq, instr->environment()); 5118 DeoptimizeIf(tag == 0 ? ne : eq, instr->environment());
5119 } else { 5119 } else {
5120 __ and_(scratch, scratch, Operand(mask)); 5120 __ and_(scratch, scratch, Operand(mask));
5121 __ cmp(scratch, Operand(tag)); 5121 __ cmp(scratch, Operand(tag));
5122 DeoptimizeIf(ne, instr->environment()); 5122 DeoptimizeIf(ne, instr->environment());
5123 } 5123 }
5124 } 5124 }
5125 } 5125 }
5126 5126
5127 5127
5128 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5128 void LCodeGen::DoCheckValue(LCheckValue* instr) {
5129 Register reg = ToRegister(instr->value()); 5129 Register reg = ToRegister(instr->value());
5130 Handle<JSFunction> target = instr->hydrogen()->target(); 5130 Handle<HeapObject> object = instr->hydrogen()->object();
5131 AllowDeferredHandleDereference smi_check; 5131 AllowDeferredHandleDereference smi_check;
5132 if (isolate()->heap()->InNewSpace(*target)) { 5132 if (isolate()->heap()->InNewSpace(*object)) {
5133 Register reg = ToRegister(instr->value()); 5133 Register reg = ToRegister(instr->value());
5134 Handle<Cell> cell = isolate()->factory()->NewCell(target); 5134 Handle<Cell> cell = isolate()->factory()->NewCell(object);
5135 __ mov(ip, Operand(Handle<Object>(cell))); 5135 __ mov(ip, Operand(Handle<Object>(cell)));
5136 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset)); 5136 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
5137 __ cmp(reg, ip); 5137 __ cmp(reg, ip);
5138 } else { 5138 } else {
5139 __ cmp(reg, Operand(target)); 5139 __ cmp(reg, Operand(object));
5140 } 5140 }
5141 DeoptimizeIf(ne, instr->environment()); 5141 DeoptimizeIf(ne, instr->environment());
5142 } 5142 }
5143 5143
5144 5144
5145 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { 5145 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
5146 { 5146 {
5147 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); 5147 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
5148 __ push(object); 5148 __ push(object);
5149 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr); 5149 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
5773 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5773 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5774 __ ldr(result, FieldMemOperand(scratch, 5774 __ ldr(result, FieldMemOperand(scratch,
5775 FixedArray::kHeaderSize - kPointerSize)); 5775 FixedArray::kHeaderSize - kPointerSize));
5776 __ bind(&done); 5776 __ bind(&done);
5777 } 5777 }
5778 5778
5779 5779
5780 #undef __ 5780 #undef __
5781 5781
5782 } } // namespace v8::internal 5782 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698