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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | no next file » | 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 } 1024 }
1018 1025
1019 1026
1020 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { 1027 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
1021 ++argument_count_; 1028 ++argument_count_;
1022 LOperand* argument = UseOrConstant(instr->argument()); 1029 LOperand* argument = UseOrConstant(instr->argument());
1023 return new(zone()) LPushArgument(argument); 1030 return new(zone()) LPushArgument(argument);
1024 } 1031 }
1025 1032
1026 1033
1034 LInstruction* LChunkBuilder::DoInnerAllocatedObject(
1035 HInnerAllocatedObject* inner_object) {
1036 LOperand* base_object = UseRegisterAtStart(inner_object->base_object());
1037 LInnerAllocatedObject* result =
1038 new(zone()) LInnerAllocatedObject(base_object);
1039 return DefineAsRegister(result);
1040 }
1041
1042
1027 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1043 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1028 return instr->HasNoUses() 1044 return instr->HasNoUses()
1029 ? NULL 1045 ? NULL
1030 : DefineAsRegister(new(zone()) LThisFunction); 1046 : DefineAsRegister(new(zone()) LThisFunction);
1031 } 1047 }
1032 1048
1033 1049
1034 LInstruction* LChunkBuilder::DoContext(HContext* instr) { 1050 LInstruction* LChunkBuilder::DoContext(HContext* instr) {
1035 // If there is a non-return use, the context must be allocated in a register. 1051 // If there is a non-return use, the context must be allocated in a register.
1036 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) { 1052 for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2446 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2431 LOperand* object = UseRegister(instr->object()); 2447 LOperand* object = UseRegister(instr->object());
2432 LOperand* index = UseTempRegister(instr->index()); 2448 LOperand* index = UseTempRegister(instr->index());
2433 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2449 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2434 } 2450 }
2435 2451
2436 2452
2437 } } // namespace v8::internal 2453 } } // namespace v8::internal
2438 2454
2439 #endif // V8_TARGET_ARCH_X64 2455 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698