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

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

Issue 6624085: [Isolates] Merge 7051:7083 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('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 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { 378 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
379 object()->PrintTo(stream); 379 object()->PrintTo(stream);
380 stream->Add("["); 380 stream->Add("[");
381 key()->PrintTo(stream); 381 key()->PrintTo(stream);
382 stream->Add("] <- "); 382 stream->Add("] <- ");
383 value()->PrintTo(stream); 383 value()->PrintTo(stream);
384 } 384 }
385 385
386 386
387 LChunk::LChunk(HGraph* graph) 387 LChunk::LChunk(CompilationInfo* info, HGraph* graph)
388 : spill_slot_count_(0), 388 : spill_slot_count_(0),
389 info_(info),
389 graph_(graph), 390 graph_(graph),
390 instructions_(32), 391 instructions_(32),
391 pointer_maps_(8), 392 pointer_maps_(8),
392 inlined_closures_(1) { 393 inlined_closures_(1) {
393 } 394 }
394 395
395 396
396 int LChunk::GetNextSpillIndex(bool is_double) { 397 int LChunk::GetNextSpillIndex(bool is_double) {
397 // Skip a slot if for a double-width slot. 398 // Skip a slot if for a double-width slot.
398 if (is_double) spill_slot_count_++; 399 if (is_double) spill_slot_count_++;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) { 470 LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
470 return LConstantOperand::Create(constant->id()); 471 return LConstantOperand::Create(constant->id());
471 } 472 }
472 473
473 474
474 int LChunk::GetParameterStackSlot(int index) const { 475 int LChunk::GetParameterStackSlot(int index) const {
475 // The receiver is at index 0, the first parameter at index 1, so we 476 // The receiver is at index 0, the first parameter at index 1, so we
476 // shift all parameter indexes down by the number of parameters, and 477 // shift all parameter indexes down by the number of parameters, and
477 // make sure they end up negative so they are distinguishable from 478 // make sure they end up negative so they are distinguishable from
478 // spill slots. 479 // spill slots.
479 int result = index - graph()->info()->scope()->num_parameters() - 1; 480 int result = index - info()->scope()->num_parameters() - 1;
480 ASSERT(result < 0); 481 ASSERT(result < 0);
481 return result; 482 return result;
482 } 483 }
483 484
484 // A parameter relative to ebp in the arguments stub. 485 // A parameter relative to ebp in the arguments stub.
485 int LChunk::ParameterAt(int index) { 486 int LChunk::ParameterAt(int index) {
486 ASSERT(-1 <= index); // -1 is the receiver. 487 ASSERT(-1 <= index); // -1 is the receiver.
487 return (1 + graph()->info()->scope()->num_parameters() - index) * 488 return (1 + info()->scope()->num_parameters() - index) *
488 kPointerSize; 489 kPointerSize;
489 } 490 }
490 491
491 492
492 LGap* LChunk::GetGapAt(int index) const { 493 LGap* LChunk::GetGapAt(int index) const {
493 return LGap::cast(instructions_[index]); 494 return LGap::cast(instructions_[index]);
494 } 495 }
495 496
496 497
497 bool LChunk::IsGapAt(int index) const { 498 bool LChunk::IsGapAt(int index) const {
(...skipping 18 matching lines...) Expand all
516 517
517 518
518 Representation LChunk::LookupLiteralRepresentation( 519 Representation LChunk::LookupLiteralRepresentation(
519 LConstantOperand* operand) const { 520 LConstantOperand* operand) const {
520 return graph_->LookupValue(operand->index())->representation(); 521 return graph_->LookupValue(operand->index())->representation();
521 } 522 }
522 523
523 524
524 LChunk* LChunkBuilder::Build() { 525 LChunk* LChunkBuilder::Build() {
525 ASSERT(is_unused()); 526 ASSERT(is_unused());
526 chunk_ = new LChunk(graph()); 527 chunk_ = new LChunk(info(), graph());
527 HPhase phase("Building chunk", chunk_); 528 HPhase phase("Building chunk", chunk_);
528 status_ = BUILDING; 529 status_ = BUILDING;
529 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); 530 const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
530 for (int i = 0; i < blocks->length(); i++) { 531 for (int i = 0; i < blocks->length(); i++) {
531 HBasicBlock* next = NULL; 532 HBasicBlock* next = NULL;
532 if (i < blocks->length() - 1) next = blocks->at(i + 1); 533 if (i < blocks->length() - 1) next = blocks->at(i + 1);
533 DoBasicBlock(blocks->at(i), next); 534 DoBasicBlock(blocks->at(i), next);
534 if (is_aborted()) return NULL; 535 if (is_aborted()) return NULL;
535 } 536 }
536 status_ = DONE; 537 status_ = DONE;
537 return chunk_; 538 return chunk_;
538 } 539 }
539 540
540 541
541 void LChunkBuilder::Abort(const char* format, ...) { 542 void LChunkBuilder::Abort(const char* format, ...) {
542 if (FLAG_trace_bailout) { 543 if (FLAG_trace_bailout) {
543 SmartPointer<char> debug_name = graph()->debug_name()->ToCString(); 544 SmartPointer<char> name(info()->shared_info()->DebugName()->ToCString());
544 PrintF("Aborting LChunk building in @\"%s\": ", *debug_name); 545 PrintF("Aborting LChunk building in @\"%s\": ", *name);
545 va_list arguments; 546 va_list arguments;
546 va_start(arguments, format); 547 va_start(arguments, format);
547 OS::VPrint(format, arguments); 548 OS::VPrint(format, arguments);
548 va_end(arguments); 549 va_end(arguments);
549 PrintF("\n"); 550 PrintF("\n");
550 } 551 }
551 status_ = ABORTED; 552 status_ = ABORTED;
552 } 553 }
553 554
554 555
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 2033
2033 2034
2034 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2035 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2035 HEnvironment* outer = current_block_->last_environment()->outer(); 2036 HEnvironment* outer = current_block_->last_environment()->outer();
2036 current_block_->UpdateEnvironment(outer); 2037 current_block_->UpdateEnvironment(outer);
2037 return NULL; 2038 return NULL;
2038 } 2039 }
2039 2040
2040 2041
2041 } } // namespace v8::internal 2042 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698