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

Unified Diff: src/hydrogen-instructions.h

Issue 14159028: Fixed an issue with HConstant::InNewSpace() for parallel compilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Be able to recognize if running on the optimizer thread Created 7 years, 8 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 | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 3090f46f1f050bc0b810a9d1a4a90bb4e8026f76..7722e1d9edb59627a98d99acc23c49452305c7ba 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3199,7 +3199,9 @@ class HConstant: public HTemplateInstruction<0> {
Handle<Object> handle() {
if (handle_.is_null()) {
- handle_ = FACTORY->NewNumber(double_value_, pretenure());
+ // The calculation for not_in_new_space_ must be revisited
+ // if the handle isn't created TENURED here.
+ handle_ = FACTORY->NewNumber(double_value_, TENURED);
}
ALLOW_HANDLE_DEREF(Isolate::Current(), "smi check");
ASSERT(has_int32_value_ || !handle_->IsSmi());
@@ -3213,16 +3215,7 @@ class HConstant: public HTemplateInstruction<0> {
std::isnan(double_value_));
}
- bool InNewSpace() const {
- if (!handle_.is_null()) {
- ALLOW_HANDLE_DEREF(isolate(), "using raw address");
- return isolate()->heap()->InNewSpace(*handle_);
- }
- // If the handle wasn't created yet, then we have a number.
- // If the handle is created it'll be tenured in old space.
- ASSERT(pretenure() == TENURED);
- return false;
- }
+ bool GuaranteedInOldSpace() const { return guaranteed_in_old_space_; }
bool ImmortalImmovable() const {
if (has_int32_value_) {
@@ -3355,12 +3348,14 @@ class HConstant: public HTemplateInstruction<0> {
virtual bool IsDeletable() const { return true; }
+ void set_guaranteed_in_old_space(bool value) {
+ guaranteed_in_old_space_ = value;
+ }
+
// If this is a numerical constant, handle_ either points to to the
// HeapObject the constant originated from or is null. If the
// constant is non-numeric, handle_ always points to a valid
// constant HeapObject.
- static PretenureFlag pretenure() { return TENURED; }
-
Handle<Object> handle_;
UniqueValueId unique_id_;
@@ -3373,6 +3368,7 @@ class HConstant: public HTemplateInstruction<0> {
bool has_double_value_ : 1;
bool is_internalized_string_ : 1; // TODO(yangguo): make this part of HType.
bool boolean_value_ : 1;
+ bool guaranteed_in_old_space_ : 1;
int32_t int32_value_;
double double_value_;
HType type_from_value_;
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698