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

Unified Diff: src/hydrogen-instructions.cc

Issue 6452001: Allow esi to be an allocatable register on IA32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 0ff41ba2388fb7cd34376a1e19e26d472904d9dc..31cd2aa8e0b14047ddd6744008f6addc78496135 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -281,6 +281,88 @@ void HValue::SetOperandAt(int index, HValue* value) {
}
+void HLoadKeyedGeneric::InternalSetOperandAt(int index, HValue* value) {
+ if (index < 2) {
+ operands_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HCallKeyed::InternalSetOperandAt(int index, HValue* value) {
+ // The key and all the arguments are stored in the base class's arguments_
+ // vector. The context is in the object itself. Ugly.
+ if (index <= argument_count()) {
+ arguments_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HCallNamed::InternalSetOperandAt(int index, HValue* value) {
+ // The arguments are in the base class's arguments_ vector. The context
+ // is in the object itself.
+ if (index < argument_count()) {
+ arguments_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HCallFunction::InternalSetOperandAt(int index, HValue* value) {
+ // The arguments are in the base class's arguments_ vector. The context
+ // is in the object itself.
+ if (index < argument_count()) {
+ arguments_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HCallGlobal::InternalSetOperandAt(int index, HValue* value) {
+ // The arguments are in the base class's arguments_ vector. The context
+ // is in the object itself.
+ if (index < argument_count()) {
+ arguments_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HCallNew::InternalSetOperandAt(int index, HValue* value) {
+ // The arguments are in the base class's arguments_ vector. The context
+ // is in the object itself.
+ if (index < argument_count()) {
+ arguments_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HStoreKeyedGeneric::InternalSetOperandAt(int index, HValue* value) {
+ if (index < 3) {
+ operands_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
+void HStoreNamedGeneric::InternalSetOperandAt(int index, HValue* value) {
+ if (index < 2) {
+ operands_[index] = value;
+ } else {
+ context_ = value;
+ }
+}
+
+
void HValue::ReplaceAndDelete(HValue* other) {
ReplaceValue(other);
Delete();
@@ -731,13 +813,24 @@ void HCallRuntime::PrintDataTo(StringStream* stream) const {
HCall::PrintDataTo(stream);
}
+
void HCallStub::PrintDataTo(StringStream* stream) const {
- stream->Add("%s(%d)",
+ HUnaryOperation::PrintDataTo(stream);
+ stream->Add(" %s(%d)",
CodeStub::MajorName(major_key_, false),
argument_count_);
}
+void HInstanceOf::PrintDataTo(StringStream* stream) const {
+ left()->PrintNameTo(stream);
+ stream->Add(" ");
+ right()->PrintNameTo(stream);
+ stream->Add(" ");
+ context()->PrintNameTo(stream);
+}
+
+
Range* HValue::InferRange() {
if (representation().IsTagged()) {
// Tagged values are always in int32 range when converted to integer,

Powered by Google App Engine
This is Rietveld 408576698