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

Side by Side Diff: src/ast.cc

Issue 46088: Revert 1469 and 1472 due to a bug with array literals. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ast.h ('k') | src/codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return scope()->AllowsLazyCompilation(); 128 return scope()->AllowsLazyCompilation();
129 } 129 }
130 130
131 131
132 ObjectLiteral::Property::Property(Literal* key, Expression* value) { 132 ObjectLiteral::Property::Property(Literal* key, Expression* value) {
133 key_ = key; 133 key_ = key;
134 value_ = value; 134 value_ = value;
135 Object* k = *key->handle(); 135 Object* k = *key->handle();
136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { 136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) {
137 kind_ = PROTOTYPE; 137 kind_ = PROTOTYPE;
138 } else if (value_->AsMaterializedLiteral() != NULL) {
139 kind_ = MATERIALIZED_LITERAL;
140 } else if (value_->AsLiteral() != NULL) {
141 kind_ = CONSTANT;
142 } else { 138 } else {
143 kind_ = COMPUTED; 139 kind_ = value_->AsLiteral() == NULL ? COMPUTED : CONSTANT;
144 } 140 }
145 } 141 }
146 142
147 143
148 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { 144 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) {
149 key_ = new Literal(value->name()); 145 key_ = new Literal(value->name());
150 value_ = value; 146 value_ = value;
151 kind_ = is_getter ? GETTER : SETTER; 147 kind_ = is_getter ? GETTER : SETTER;
152 } 148 }
153 149
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (kInfinity - max_match_ < node_max_match) { 477 if (kInfinity - max_match_ < node_max_match) {
482 max_match_ = kInfinity; 478 max_match_ = kInfinity;
483 } else { 479 } else {
484 max_match_ += node->max_match(); 480 max_match_ += node->max_match();
485 } 481 }
486 } 482 }
487 } 483 }
488 484
489 485
490 } } // namespace v8::internal 486 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698