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

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

Issue 12812002: HSubAllocatedObject instruction allows hydrogen code to carve up (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated to HInnerAllocatedObject Created 7 years, 9 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/x64/lithium-codegen-x64.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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { 286 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
287 stream->Add("if typeof "); 287 stream->Add("if typeof ");
288 value()->PrintTo(stream); 288 value()->PrintTo(stream);
289 stream->Add(" == \"%s\" then B%d else B%d", 289 stream->Add(" == \"%s\" then B%d else B%d",
290 *hydrogen()->type_literal()->ToCString(), 290 *hydrogen()->type_literal()->ToCString(),
291 true_block_id(), false_block_id()); 291 true_block_id(), false_block_id());
292 } 292 }
293 293
294 294
295 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
296 stream->Add(" = ");
297 base_object()->PrintTo(stream);
298 stream->Add(" + %d", offset());
299 }
300
301
295 void LCallConstantFunction::PrintDataTo(StringStream* stream) { 302 void LCallConstantFunction::PrintDataTo(StringStream* stream) {
296 stream->Add("#%d / ", arity()); 303 stream->Add("#%d / ", arity());
297 } 304 }
298 305
299 306
300 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { 307 void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
301 stream->Add("/%s ", hydrogen()->OpName()); 308 stream->Add("/%s ", hydrogen()->OpName());
302 value()->PrintTo(stream); 309 value()->PrintTo(stream);
303 } 310 }
304 311
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 } 1081 }
1075 1082
1076 1083
1077 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { 1084 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1078 ++argument_count_; 1085 ++argument_count_;
1079 LOperand* argument = UseAny(instr->argument()); 1086 LOperand* argument = UseAny(instr->argument());
1080 return new(zone()) LPushArgument(argument); 1087 return new(zone()) LPushArgument(argument);
1081 } 1088 }
1082 1089
1083 1090
1091 LInstruction* LChunkBuilder::DoInnerAllocatedObject(
1092 HInnerAllocatedObject* inner_object) {
1093 LOperand* base_object = UseRegisterAtStart(inner_object->base_object());
1094 LInnerAllocatedObject* result =
1095 new(zone()) LInnerAllocatedObject(base_object);
1096 return DefineAsRegister(result);
1097 }
1098
1099
1084 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1100 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1085 return instr->HasNoUses() 1101 return instr->HasNoUses()
1086 ? NULL 1102 ? NULL
1087 : DefineAsRegister(new(zone()) LThisFunction); 1103 : DefineAsRegister(new(zone()) LThisFunction);
1088 } 1104 }
1089 1105
1090 1106
1091 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1107 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1092 if (instr->HasNoUses()) return NULL; 1108 if (instr->HasNoUses()) return NULL;
1093 1109
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2612 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2597 LOperand* object = UseRegister(instr->object()); 2613 LOperand* object = UseRegister(instr->object());
2598 LOperand* index = UseTempRegister(instr->index()); 2614 LOperand* index = UseTempRegister(instr->index());
2599 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2615 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2600 } 2616 }
2601 2617
2602 2618
2603 } } // namespace v8::internal 2619 } } // namespace v8::internal
2604 2620
2605 #endif // V8_TARGET_ARCH_IA32 2621 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698