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

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

Issue 21065006: Replace HCheckPrototypeMaps by explicit map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Prepare all HConstant js objects Created 7 years, 4 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.h ('k') | src/mark-compact.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 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 2042
2043 2043
2044 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { 2044 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
2045 LOperand* value = UseRegisterAtStart(instr->value()); 2045 LOperand* value = UseRegisterAtStart(instr->value());
2046 LOperand* temp = TempRegister(); 2046 LOperand* temp = TempRegister();
2047 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp); 2047 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp);
2048 return AssignEnvironment(result); 2048 return AssignEnvironment(result);
2049 } 2049 }
2050 2050
2051 2051
2052 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
2053 LUnallocated* temp = NULL;
2054 if (!instr->CanOmitPrototypeChecks()) temp = TempRegister();
2055 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp);
2056 if (instr->CanOmitPrototypeChecks()) return result;
2057 return AssignEnvironment(result);
2058 }
2059
2060
2061 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { 2052 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
2062 // If the target is in new space, we'll emit a global cell compare and so 2053 // If the target is in new space, we'll emit a global cell compare and so
2063 // want the value in a register. If the target gets promoted before we 2054 // want the value in a register. If the target gets promoted before we
2064 // emit code, we will still get the register but will do an immediate 2055 // emit code, we will still get the register but will do an immediate
2065 // compare instead of the cell compare. This is safe. 2056 // compare instead of the cell compare. This is safe.
2066 LOperand* value = instr->target_in_new_space() 2057 LOperand* value = instr->target_in_new_space()
2067 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); 2058 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value());
2068 return AssignEnvironment(new(zone()) LCheckFunction(value)); 2059 return AssignEnvironment(new(zone()) LCheckFunction(value));
2069 } 2060 }
2070 2061
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2742 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2752 LOperand* object = UseRegister(instr->object()); 2743 LOperand* object = UseRegister(instr->object());
2753 LOperand* index = UseTempRegister(instr->index()); 2744 LOperand* index = UseTempRegister(instr->index());
2754 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2745 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2755 } 2746 }
2756 2747
2757 2748
2758 } } // namespace v8::internal 2749 } } // namespace v8::internal
2759 2750
2760 #endif // V8_TARGET_ARCH_IA32 2751 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698