Reviewers: sigurds,

Description:
Undo bogus "fix" of literals array loading.

[email protected]

Please review this at https://codereview.chromium.org/476213005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -9 lines):
  M src/compiler/ast-graph-builder.cc


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());


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to