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

Unified Diff: src/crankshaft/typing.h

Issue 1968383002: Remove Expression::bounds_, in order to conserve memory during parsing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove Expression::bounds_ Created 4 years, 7 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/crankshaft/typing.h
diff --git a/src/crankshaft/typing.h b/src/crankshaft/typing.h
index 40b538aef33927aa66408f5cabf83fb5efa3ab28..27b6809a1c5f2cf11606ae1ae78e0d46c9f6ccdd 100644
--- a/src/crankshaft/typing.h
+++ b/src/crankshaft/typing.h
@@ -6,6 +6,7 @@
#define V8_CRANKSHAFT_TYPING_H_
#include "src/allocation.h"
+#include "src/ast/ast-type-bounds.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/effects.h"
@@ -16,11 +17,11 @@
namespace v8 {
namespace internal {
-
class AstTyper: public AstVisitor {
public:
AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
- Scope* scope, BailoutId osr_ast_id, FunctionLiteral* root);
+ Scope* scope, BailoutId osr_ast_id, FunctionLiteral* root,
+ AstTypeBounds* bounds);
void Run();
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
@@ -41,15 +42,16 @@ class AstTyper: public AstVisitor {
FunctionLiteral* root_;
TypeFeedbackOracle oracle_;
Store store_;
+ AstTypeBounds* bounds_;
Zone* zone() const { return zone_; }
TypeFeedbackOracle* oracle() { return &oracle_; }
void NarrowType(Expression* e, Bounds b) {
- e->set_bounds(Bounds::Both(e->bounds(), b, zone()));
+ bounds_->set(e, Bounds::Both(bounds_->get(e), b, zone()));
}
void NarrowLowerType(Expression* e, Type* t) {
- e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone()));
+ bounds_->set(e, Bounds::NarrowLower(bounds_->get(e), t, zone()));
}
Effects EnterEffects() {

Powered by Google App Engine
This is Rietveld 408576698