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

Side by Side Diff: src/compiler/instruction.cc

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 3 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/compiler/instruction.h ('k') | src/compiler/instruction-codes.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction.h" 5 #include "src/compiler/instruction.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 387 }
388 388
389 389
390 void InstructionSequence::AddGapMove(int index, InstructionOperand* from, 390 void InstructionSequence::AddGapMove(int index, InstructionOperand* from,
391 InstructionOperand* to) { 391 InstructionOperand* to) {
392 GapAt(index)->GetOrCreateParallelMove(GapInstruction::START, zone())->AddMove( 392 GapAt(index)->GetOrCreateParallelMove(GapInstruction::START, zone())->AddMove(
393 from, to, zone()); 393 from, to, zone());
394 } 394 }
395 395
396 396
397 int InstructionSequence::AddDeoptimizationEntry( 397 InstructionSequence::StateId InstructionSequence::AddFrameStateDescriptor(
398 FrameStateDescriptor* descriptor) { 398 FrameStateDescriptor* descriptor) {
399 int deoptimization_id = static_cast<int>(deoptimization_entries_.size()); 399 int deoptimization_id = static_cast<int>(deoptimization_entries_.size());
400 deoptimization_entries_.push_back(descriptor); 400 deoptimization_entries_.push_back(descriptor);
401 return deoptimization_id; 401 return StateId::FromInt(deoptimization_id);
402 } 402 }
403 403
404 FrameStateDescriptor* InstructionSequence::GetDeoptimizationEntry( 404 FrameStateDescriptor* InstructionSequence::GetFrameStateDescriptor(
405 int deoptimization_id) { 405 InstructionSequence::StateId state_id) {
406 return deoptimization_entries_[deoptimization_id]; 406 return deoptimization_entries_[state_id.ToInt()];
407 } 407 }
408 408
409 409
410 int InstructionSequence::GetDeoptimizationEntryCount() { 410 int InstructionSequence::GetFrameStateDescriptorCount() {
411 return static_cast<int>(deoptimization_entries_.size()); 411 return static_cast<int>(deoptimization_entries_.size());
412 } 412 }
413 413
414 414
415 OStream& operator<<(OStream& os, const InstructionSequence& code) { 415 OStream& operator<<(OStream& os, const InstructionSequence& code) {
416 for (size_t i = 0; i < code.immediates_.size(); ++i) { 416 for (size_t i = 0; i < code.immediates_.size(); ++i) {
417 Constant constant = code.immediates_[i]; 417 Constant constant = code.immediates_[i];
418 os << "IMM#" << i << ": " << constant << "\n"; 418 os << "IMM#" << i << ": " << constant << "\n";
419 } 419 }
420 int i = 0; 420 int i = 0;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 os << " B" << (*iter)->id(); 475 os << " B" << (*iter)->id();
476 } 476 }
477 os << "\n"; 477 os << "\n";
478 } 478 }
479 return os; 479 return os;
480 } 480 }
481 481
482 } // namespace compiler 482 } // namespace compiler
483 } // namespace internal 483 } // namespace internal
484 } // namespace v8 484 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-codes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698