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

Unified Diff: src/register-allocator.cc

Issue 57052: * String type inference using compiler framework. (Closed)
Patch Set: Changes relative to head of bleeding edge (don't do diff with earlier versions) Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/register-allocator.h ('k') | src/register-allocator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-allocator.cc
diff --git a/src/register-allocator.cc b/src/register-allocator.cc
index 028baebdfc51708c1391a808a43cf84df1ce401f..94e031fa0bf9e4fff3e01c58865cf69622432fd3 100644
--- a/src/register-allocator.cc
+++ b/src/register-allocator.cc
@@ -36,8 +36,19 @@ namespace v8 { namespace internal {
// Result implementation.
Result::Result(Register reg, CodeGenerator* cgen)
- : type_(REGISTER),
- cgen_(cgen) {
+ : static_type_(),
+ type_(REGISTER),
+ cgen_(cgen) {
+ data_.reg_ = reg;
+ ASSERT(reg.is_valid());
+ cgen_->allocator()->Use(reg);
+}
+
+
+Result::Result(Register reg, CodeGenerator* cgen, StaticType static_type)
+ : static_type_(static_type),
+ type_(REGISTER),
+ cgen_(cgen) {
data_.reg_ = reg;
ASSERT(reg.is_valid());
cgen_->allocator()->Use(reg);
@@ -45,6 +56,7 @@ Result::Result(Register reg, CodeGenerator* cgen)
void Result::CopyTo(Result* destination) const {
+ destination->static_type_ = static_type_;
destination->type_ = type();
destination->cgen_ = cgen_;
« no previous file with comments | « src/register-allocator.h ('k') | src/register-allocator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698