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

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

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tweaks Created 7 years, 10 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
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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 ASSERT(instr->object()->representation().IsTagged()); 2091 ASSERT(instr->object()->representation().IsTagged());
2092 ASSERT(instr->key()->representation().IsTagged()); 2092 ASSERT(instr->key()->representation().IsTagged());
2093 ASSERT(instr->value()->representation().IsTagged()); 2093 ASSERT(instr->value()->representation().IsTagged());
2094 2094
2095 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr); 2095 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr);
2096 } 2096 }
2097 2097
2098 2098
2099 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2099 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2100 HTransitionElementsKind* instr) { 2100 HTransitionElementsKind* instr) {
2101 LOperand* object = UseRegister(instr->object());
2101 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { 2102 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
2102 LOperand* object = UseRegister(instr->object());
2103 LOperand* new_map_reg = TempRegister(); 2103 LOperand* new_map_reg = TempRegister();
2104 LTransitionElementsKind* result = 2104 LTransitionElementsKind* result =
2105 new(zone()) LTransitionElementsKind(object, new_map_reg, NULL); 2105 new(zone()) LTransitionElementsKind(object, new_map_reg);
2106 return DefineSameAsFirst(result); 2106 return DefineSameAsFirst(result);
2107 } else { 2107 } else {
2108 LOperand* object = UseFixed(instr->object(), r0);
2109 LOperand* fixed_object_reg = FixedTemp(r2);
2110 LOperand* new_map_reg = FixedTemp(r3);
2111 LTransitionElementsKind* result = 2108 LTransitionElementsKind* result =
2112 new(zone()) LTransitionElementsKind(object, 2109 new(zone()) LTransitionElementsKind(object, NULL);
2113 new_map_reg, 2110 return AssignPointerMap(result);
2114 fixed_object_reg);
2115 return MarkAsCall(DefineFixed(result, r0), instr);
2116 } 2111 }
2117 } 2112 }
2118 2113
2119 2114
2115 LInstruction* LChunkBuilder::DoTrapAllocationMemento(
2116 HTrapAllocationMemento* instr) {
2117 LOperand* object = UseRegister(instr->object());
2118 LOperand* temp = TempRegister();
2119 LTrapAllocationMemento* result =
2120 new(zone()) LTrapAllocationMemento(object, temp);
2121 return AssignEnvironment(result);
2122 }
2123
2124
2120 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 2125 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
2121 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2126 bool needs_write_barrier = instr->NeedsWriteBarrier();
2122 bool needs_write_barrier_for_map = !instr->transition().is_null() && 2127 bool needs_write_barrier_for_map = !instr->transition().is_null() &&
2123 instr->NeedsWriteBarrierForMap(); 2128 instr->NeedsWriteBarrierForMap();
2124 2129
2125 LOperand* obj; 2130 LOperand* obj;
2126 if (needs_write_barrier) { 2131 if (needs_write_barrier) {
2127 obj = instr->is_in_object() 2132 obj = instr->is_in_object()
2128 ? UseRegister(instr->object()) 2133 ? UseRegister(instr->object())
2129 : UseTempRegister(instr->object()); 2134 : UseTempRegister(instr->object());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 } 2187 }
2183 2188
2184 2189
2185 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { 2190 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) {
2186 LAllocateObject* result = 2191 LAllocateObject* result =
2187 new(zone()) LAllocateObject(TempRegister(), TempRegister()); 2192 new(zone()) LAllocateObject(TempRegister(), TempRegister());
2188 return AssignPointerMap(DefineAsRegister(result)); 2193 return AssignPointerMap(DefineAsRegister(result));
2189 } 2194 }
2190 2195
2191 2196
2197 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2198 info()->MarkAsDeferredCalling();
2199 LOperand* size = UseTempRegister(instr->size());
2200 LOperand* temp1 = TempRegister();
2201 LOperand* temp2 = TempRegister();
2202 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2);
2203 return AssignPointerMap(DefineAsRegister(result));
2204 }
2205
2206
2192 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { 2207 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) {
2193 return MarkAsCall(DefineFixed(new(zone()) LFastLiteral, r0), instr); 2208 return MarkAsCall(DefineFixed(new(zone()) LFastLiteral, r0), instr);
2194 } 2209 }
2195 2210
2196 2211
2197 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { 2212 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
2198 return MarkAsCall(DefineFixed(new(zone()) LArrayLiteral, r0), instr); 2213 return MarkAsCall(DefineFixed(new(zone()) LArrayLiteral, r0), instr);
2199 } 2214 }
2200 2215
2201 2216
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2413 2428
2414 2429
2415 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2430 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2416 LOperand* object = UseRegister(instr->object()); 2431 LOperand* object = UseRegister(instr->object());
2417 LOperand* index = UseRegister(instr->index()); 2432 LOperand* index = UseRegister(instr->index());
2418 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2433 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2419 } 2434 }
2420 2435
2421 2436
2422 } } // namespace v8::internal 2437 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698