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

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

Issue 6326003: X64 Crnakshaft: Added GeneratePrologue implementation. (Closed)
Patch Set: Addressed review comments. 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) {
318 return LDoubleStackSlot::Create(index);
319 } else {
320 return LStackSlot::Create(index);
321 }
317 } 322 }
318 323
319 324
320 void LChunk::MarkEmptyBlocks() { 325 void LChunk::MarkEmptyBlocks() {
321 HPhase phase("Mark empty blocks", this); 326 HPhase phase("Mark empty blocks", this);
322 for (int i = 0; i < graph()->blocks()->length(); ++i) { 327 for (int i = 0; i < graph()->blocks()->length(); ++i) {
323 HBasicBlock* block = graph()->blocks()->at(i); 328 HBasicBlock* block = graph()->blocks()->at(i);
324 int first = block->first_instruction_index(); 329 int first = block->first_instruction_index();
325 int last = block->last_instruction_index(); 330 int last = block->last_instruction_index();
326 LInstruction* first_instr = instructions()->at(first); 331 LInstruction* first_instr = instructions()->at(first);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 return NULL; 735 return NULL;
731 } 736 }
732 737
733 738
734 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, 739 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
735 HArithmeticBinaryOperation* instr) { 740 HArithmeticBinaryOperation* instr) {
736 Abort("Unimplemented: %s", "DoArithmeticT"); 741 Abort("Unimplemented: %s", "DoArithmeticT");
737 return NULL; 742 return NULL;
738 } 743 }
739 744
745
740 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { 746 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
741 ASSERT(is_building()); 747 ASSERT(is_building());
742 current_block_ = block; 748 current_block_ = block;
743 next_block_ = next_block; 749 next_block_ = next_block;
744 if (block->IsStartBlock()) { 750 if (block->IsStartBlock()) {
745 block->UpdateEnvironment(graph_->start_environment()); 751 block->UpdateEnvironment(graph_->start_environment());
746 argument_count_ = 0; 752 argument_count_ = 0;
747 } else if (block->predecessors()->length() == 1) { 753 } else if (block->predecessors()->length() == 1) {
748 // We have a single predecessor => copy environment and outgoing 754 // We have a single predecessor => copy environment and outgoing
749 // argument count from the predecessor. 755 // argument count from the predecessor.
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1415
1410 1416
1411 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1417 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1412 Abort("Unimplemented: %s", "DoLeaveInlined"); 1418 Abort("Unimplemented: %s", "DoLeaveInlined");
1413 return NULL; 1419 return NULL;
1414 } 1420 }
1415 1421
1416 } } // namespace v8::internal 1422 } } // namespace v8::internal
1417 1423
1418 #endif // V8_TARGET_ARCH_X64 1424 #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