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

Unified Diff: src/hydrogen.h

Issue 10544196: Defer creating Handles for HConstants to the code generation phase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase & cosmetic changes. Created 8 years, 6 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.cc » ('j') | src/hydrogen-instructions.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index abaa4401b4f7ba8a44a7d40d0182a7331757bf8d..05fd904c32d12b3b59dbc3c95f6ee5bfff3a12ed 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -287,6 +287,8 @@ class HGraph: public ZoneObject {
undefined_constant_.set(constant);
}
HConstant* GetConstantUndefined() const { return undefined_constant_.get(); }
+ HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer,
+ int32_t integer_value);
HConstant* GetConstant1();
HConstant* GetConstantMinus1();
HConstant* GetConstantTrue();
@@ -298,6 +300,15 @@ class HGraph: public ZoneObject {
return arguments_object_.get();
}
+ void EnsureConstantsHaveHandles() {
+ Factory* factory = isolate()->factory();
+ for (int i = 0; i < values_.length(); i++) {
+ if (values_[i]->IsConstant()) {
+ HConstant::cast(values_[i])->EnsureHasHandle(factory);
+ }
+ }
+ }
+
void SetArgumentsObject(HArgumentsObject* object) {
arguments_object_.set(object);
}
@@ -1182,6 +1193,9 @@ class HGraphBuilder: public AstVisitor {
bool inline_bailout_;
+ HConstant* constant_undefined_;
+ HConstant* constant_null_;
+
friend class FunctionState; // Pushes and pops the state stack.
friend class AstContext; // Pushes and pops the AST context stack.
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698