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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 476213005: Undo bogus "fix" of literals array loading. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 66a371bcebd8bf4e70c4e67d409ab47a58f7f117..06294d356e52e2ff924168aa0b1b964c17f79e42 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -841,11 +841,10 @@ void AstGraphBuilder::VisitLiteral(Literal* expr) {
void AstGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) {
- Node* closure = GetFunctionClosure();
+ Handle<JSFunction> closure = info()->closure();
// Create node to materialize a regular expression literal.
- Node* literals_array =
- BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
+ Node* literals_array = jsgraph()->Constant(handle(closure->literals()));
Node* literal_index = jsgraph()->Constant(expr->literal_index());
Node* pattern = jsgraph()->Constant(expr->pattern());
Node* flags = jsgraph()->Constant(expr->flags());
@@ -856,12 +855,11 @@ void AstGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) {
void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
- Node* closure = GetFunctionClosure();
+ Handle<JSFunction> closure = info()->closure();
// Create node to deep-copy the literal boilerplate.
expr->BuildConstantProperties(isolate());
- Node* literals_array =
- BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
+ Node* literals_array = jsgraph()->Constant(handle(closure->literals()));
Node* literal_index = jsgraph()->Constant(expr->literal_index());
Node* constants = jsgraph()->Constant(expr->constant_properties());
Node* flags = jsgraph()->Constant(expr->ComputeFlags());
@@ -966,12 +964,11 @@ void AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
- Node* closure = GetFunctionClosure();
+ Handle<JSFunction> closure = info()->closure();
// Create node to deep-copy the literal boilerplate.
expr->BuildConstantElements(isolate());
- Node* literals_array =
- BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
+ Node* literals_array = jsgraph()->Constant(handle(closure->literals()));
Node* literal_index = jsgraph()->Constant(expr->literal_index());
Node* constants = jsgraph()->Constant(expr->constant_elements());
Node* flags = jsgraph()->Constant(expr->ComputeFlags());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698