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

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

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback 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
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.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 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 ASSERT(instr->value()->representation().IsTagged()); 2032 ASSERT(instr->value()->representation().IsTagged());
2033 2033
2034 LStoreKeyedGeneric* result = 2034 LStoreKeyedGeneric* result =
2035 new(zone()) LStoreKeyedGeneric(object, key, value); 2035 new(zone()) LStoreKeyedGeneric(object, key, value);
2036 return MarkAsCall(result, instr); 2036 return MarkAsCall(result, instr);
2037 } 2037 }
2038 2038
2039 2039
2040 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2040 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2041 HTransitionElementsKind* instr) { 2041 HTransitionElementsKind* instr) {
2042 LOperand* object = UseRegister(instr->object());
2042 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { 2043 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
2043 LOperand* object = UseRegister(instr->object()); 2044 LOperand* object = UseRegister(instr->object());
2044 LOperand* new_map_reg = TempRegister(); 2045 LOperand* new_map_reg = TempRegister();
2045 LOperand* temp_reg = TempRegister(); 2046 LOperand* temp_reg = TempRegister();
2046 LTransitionElementsKind* result = 2047 LTransitionElementsKind* result =
2047 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); 2048 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg);
2048 return DefineSameAsFirst(result); 2049 return result;
2050 } else if (FLAG_compiled_transitions) {
2051 LTransitionElementsKind* result =
2052 new(zone()) LTransitionElementsKind(object, NULL, NULL);
2053 return AssignPointerMap(result);
2049 } else { 2054 } else {
2050 LOperand* object = UseFixed(instr->object(), rax); 2055 LOperand* object = UseFixed(instr->object(), rax);
2051 LOperand* fixed_object_reg = FixedTemp(rdx); 2056 LOperand* fixed_object_reg = FixedTemp(rdx);
2052 LOperand* new_map_reg = FixedTemp(rbx); 2057 LOperand* new_map_reg = FixedTemp(rbx);
2053 LTransitionElementsKind* result = 2058 LTransitionElementsKind* result =
2054 new(zone()) LTransitionElementsKind(object, 2059 new(zone()) LTransitionElementsKind(object,
2055 new_map_reg, 2060 new_map_reg,
2056 fixed_object_reg); 2061 fixed_object_reg);
2057 return MarkAsCall(DefineFixed(result, rax), instr); 2062 return MarkAsCall(result, instr);
2058 } 2063 }
2059 } 2064 }
2060 2065
2061 2066
2067 LInstruction* LChunkBuilder::DoTrapAllocationMemento(
2068 HTrapAllocationMemento* instr) {
2069 LOperand* object = UseRegister(instr->object());
2070 LOperand* temp = TempRegister();
2071 LTrapAllocationMemento* result =
2072 new(zone()) LTrapAllocationMemento(object, temp);
2073 return AssignEnvironment(result);
2074 }
2075
2076
2062 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 2077 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
2063 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2078 bool needs_write_barrier = instr->NeedsWriteBarrier();
2064 bool needs_write_barrier_for_map = !instr->transition().is_null() && 2079 bool needs_write_barrier_for_map = !instr->transition().is_null() &&
2065 instr->NeedsWriteBarrierForMap(); 2080 instr->NeedsWriteBarrierForMap();
2066 2081
2067 LOperand* obj; 2082 LOperand* obj;
2068 if (needs_write_barrier) { 2083 if (needs_write_barrier) {
2069 obj = instr->is_in_object() 2084 obj = instr->is_in_object()
2070 ? UseRegister(instr->object()) 2085 ? UseRegister(instr->object())
2071 : UseTempRegister(instr->object()); 2086 : UseTempRegister(instr->object());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 } 2135 }
2121 2136
2122 2137
2123 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { 2138 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
2124 LOperand* string = UseRegisterAtStart(instr->value()); 2139 LOperand* string = UseRegisterAtStart(instr->value());
2125 return DefineAsRegister(new(zone()) LStringLength(string)); 2140 return DefineAsRegister(new(zone()) LStringLength(string));
2126 } 2141 }
2127 2142
2128 2143
2129 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { 2144 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) {
2145 info()->MarkAsDeferredCalling();
2130 LAllocateObject* result = new(zone()) LAllocateObject(TempRegister()); 2146 LAllocateObject* result = new(zone()) LAllocateObject(TempRegister());
2131 return AssignPointerMap(DefineAsRegister(result)); 2147 return AssignPointerMap(DefineAsRegister(result));
2132 } 2148 }
2133 2149
2134 2150
2151 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2152 info()->MarkAsDeferredCalling();
2153 LOperand* size = UseTempRegister(instr->size());
2154 LOperand* temp = TempRegister();
2155 LAllocate* result = new(zone()) LAllocate(size, temp);
2156 return AssignPointerMap(DefineAsRegister(result));
2157 }
2158
2159
2135 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { 2160 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) {
2136 return MarkAsCall(DefineFixed(new(zone()) LFastLiteral, rax), instr); 2161 return MarkAsCall(DefineFixed(new(zone()) LFastLiteral, rax), instr);
2137 } 2162 }
2138 2163
2139 2164
2140 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { 2165 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
2141 return MarkAsCall(DefineFixed(new(zone()) LArrayLiteral, rax), instr); 2166 return MarkAsCall(DefineFixed(new(zone()) LArrayLiteral, rax), instr);
2142 } 2167 }
2143 2168
2144 2169
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2385 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2361 LOperand* object = UseRegister(instr->object()); 2386 LOperand* object = UseRegister(instr->object());
2362 LOperand* index = UseTempRegister(instr->index()); 2387 LOperand* index = UseTempRegister(instr->index());
2363 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2388 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2364 } 2389 }
2365 2390
2366 2391
2367 } } // namespace v8::internal 2392 } } // namespace v8::internal
2368 2393
2369 #endif // V8_TARGET_ARCH_X64 2394 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698