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

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

Issue 10701157: Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 arguments()->PrintTo(stream); 351 arguments()->PrintTo(stream);
352 352
353 stream->Add(" length "); 353 stream->Add(" length ");
354 length()->PrintTo(stream); 354 length()->PrintTo(stream);
355 355
356 stream->Add(" index "); 356 stream->Add(" index ");
357 index()->PrintTo(stream); 357 index()->PrintTo(stream);
358 } 358 }
359 359
360 360
361 int LChunk::GetNextSpillIndex(bool is_double) { 361 int LPlatformChunk::GetNextSpillIndex(bool is_double) {
362 return spill_slot_count_++; 362 return spill_slot_count_++;
363 } 363 }
364 364
365 365
366 LOperand* LChunk::GetNextSpillSlot(bool is_double) { 366 LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
367 // All stack slots are Double stack slots on x64. 367 // All stack slots are Double stack slots on x64.
368 // Alternatively, at some point, start using half-size 368 // Alternatively, at some point, start using half-size
369 // stack slots for int32 values. 369 // stack slots for int32 values.
370 int index = GetNextSpillIndex(is_double); 370 int index = GetNextSpillIndex(is_double);
371 if (is_double) { 371 if (is_double) {
372 return LDoubleStackSlot::Create(index, zone()); 372 return LDoubleStackSlot::Create(index, zone());
373 } else { 373 } else {
374 return LStackSlot::Create(index, zone()); 374 return LStackSlot::Create(index, zone());
375 } 375 }
376 } 376 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 value()->PrintTo(stream); 420 value()->PrintTo(stream);
421 } 421 }
422 422
423 423
424 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { 424 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
425 object()->PrintTo(stream); 425 object()->PrintTo(stream);
426 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); 426 stream->Add(" %p -> %p", *original_map(), *transitioned_map());
427 } 427 }
428 428
429 429
430 LChunk* LChunkBuilder::Build() { 430 LPlatformChunk* LChunkBuilder::Build() {
431 ASSERT(is_unused()); 431 ASSERT(is_unused());
432 chunk_ = new(zone()) LChunk(info(), graph()); 432 chunk_ = new(zone()) LPlatformChunk(info(), graph());
433 HPhase phase("L_Building chunk", chunk_); 433 HPhase phase("L_Building chunk", chunk_);
434 status_ = BUILDING; 434 status_ = BUILDING;
435 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); 435 const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
436 for (int i = 0; i < blocks->length(); i++) { 436 for (int i = 0; i < blocks->length(); i++) {
437 HBasicBlock* next = NULL; 437 HBasicBlock* next = NULL;
438 if (i < blocks->length() - 1) next = blocks->at(i + 1); 438 if (i < blocks->length() - 1) next = blocks->at(i + 1);
439 DoBasicBlock(blocks->at(i), next); 439 DoBasicBlock(blocks->at(i), next);
440 if (is_aborted()) return NULL; 440 if (is_aborted()) return NULL;
441 } 441 }
442 status_ = DONE; 442 status_ = DONE;
443 return chunk_; 443 return chunk_;
444 } 444 }
445 445
446 446
447 void LChunkBuilder::Abort(const char* format, ...) { 447 void LChunkBuilder::Abort(const char* format, ...) {
448 if (FLAG_trace_bailout) { 448 if (FLAG_trace_bailout) {
449 SmartArrayPointer<char> name( 449 SmartArrayPointer<char> name(
450 info()->shared_info()->DebugName()->ToCString()); 450 info()->shared_info()->DebugName()->ToCString());
451 PrintF("Aborting LChunk building in @\"%s\": ", *name); 451 PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
452 va_list arguments; 452 va_list arguments;
453 va_start(arguments, format); 453 va_start(arguments, format);
454 OS::VPrint(format, arguments); 454 OS::VPrint(format, arguments);
455 va_end(arguments); 455 va_end(arguments);
456 PrintF("\n"); 456 PrintF("\n");
457 } 457 }
458 status_ = ABORTED; 458 status_ = ABORTED;
459 } 459 }
460 460
461 461
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2258 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2259 LOperand* object = UseRegister(instr->object()); 2259 LOperand* object = UseRegister(instr->object());
2260 LOperand* index = UseTempRegister(instr->index()); 2260 LOperand* index = UseTempRegister(instr->index());
2261 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2261 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2262 } 2262 }
2263 2263
2264 2264
2265 } } // namespace v8::internal 2265 } } // namespace v8::internal
2266 2266
2267 #endif // V8_TARGET_ARCH_X64 2267 #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