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

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

Issue 6326003: X64 Crnakshaft: Added GeneratePrologue implementation. (Closed)
Patch Set: Created 9 years, 11 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
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 stream->Add(" length "); 299 stream->Add(" length ");
300 length()->PrintTo(stream); 300 length()->PrintTo(stream);
301 301
302 stream->Add(" index "); 302 stream->Add(" index ");
303 index()->PrintTo(stream); 303 index()->PrintTo(stream);
304 } 304 }
305 305
306 306
307 int LChunk::GetNextSpillIndex(bool is_double) { 307 int LChunk::GetNextSpillIndex(bool is_double) {
308 // Need to consider what index means: Is it 32 bit or 64 bit index? 308 return spill_slot_count_++;
309 UNIMPLEMENTED();
310 return 0;
311 } 309 }
312 310
313 311
314 LOperand* LChunk::GetNextSpillSlot(bool is_double) { 312 LOperand* LChunk::GetNextSpillSlot(bool is_double) {
315 UNIMPLEMENTED(); 313 // All stack slots are Double stack slots on x64.
316 return NULL; 314 // Alternatively, at some point, start using half-size
315 // stack slots for int32 values.
316 int index = GetNextSpillIndex(is_double);
317 if (is_double) return LDoubleStackSlot(index);
318 return LStackSlot::Create(index);
Rico 2011/01/14 12:57:02 I would probably make this a if - else statement o
Lasse Reichstein 2011/01/14 13:12:30 Made identical to ia32.
317 } 319 }
318 320
319 321
320 void LChunk::MarkEmptyBlocks() { 322 void LChunk::MarkEmptyBlocks() {
321 HPhase phase("Mark empty blocks", this); 323 HPhase phase("Mark empty blocks", this);
322 for (int i = 0; i < graph()->blocks()->length(); ++i) { 324 for (int i = 0; i < graph()->blocks()->length(); ++i) {
323 HBasicBlock* block = graph()->blocks()->at(i); 325 HBasicBlock* block = graph()->blocks()->at(i);
324 int first = block->first_instruction_index(); 326 int first = block->first_instruction_index();
325 int last = block->last_instruction_index(); 327 int last = block->last_instruction_index();
326 LInstruction* first_instr = instructions()->at(first); 328 LInstruction* first_instr = instructions()->at(first);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 return NULL; 732 return NULL;
731 } 733 }
732 734
733 735
734 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, 736 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
735 HArithmeticBinaryOperation* instr) { 737 HArithmeticBinaryOperation* instr) {
736 Abort("Unimplemented: %s", "DoArithmeticT"); 738 Abort("Unimplemented: %s", "DoArithmeticT");
737 return NULL; 739 return NULL;
738 } 740 }
739 741
742
740 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { 743 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
741 ASSERT(is_building()); 744 ASSERT(is_building());
742 current_block_ = block; 745 current_block_ = block;
743 next_block_ = next_block; 746 next_block_ = next_block;
744 if (block->IsStartBlock()) { 747 if (block->IsStartBlock()) {
745 block->UpdateEnvironment(graph_->start_environment()); 748 block->UpdateEnvironment(graph_->start_environment());
746 argument_count_ = 0; 749 argument_count_ = 0;
747 } else if (block->predecessors()->length() == 1) { 750 } else if (block->predecessors()->length() == 1) {
748 // We have a single predecessor => copy environment and outgoing 751 // We have a single predecessor => copy environment and outgoing
749 // argument count from the predecessor. 752 // argument count from the predecessor.
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1412
1410 1413
1411 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1414 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1412 Abort("Unimplemented: %s", "DoLeaveInlined"); 1415 Abort("Unimplemented: %s", "DoLeaveInlined");
1413 return NULL; 1416 return NULL;
1414 } 1417 }
1415 1418
1416 } } // namespace v8::internal 1419 } } // namespace v8::internal
1417 1420
1418 #endif // V8_TARGET_ARCH_X64 1421 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698