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

Side by Side Diff: src/ast.cc

Issue 1338413002: Version 4.5.103.33 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 3 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
« no previous file with comments | « include/v8-version.h ('k') | test/mjsunit/harmony/computed-property-names.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast.h" 5 #include "src/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 #include "src/builtins.h" 8 #include "src/builtins.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/contexts.h" 10 #include "src/contexts.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 uint32_t elements = 0; 434 uint32_t elements = 0;
435 for (int i = 0; i < properties()->length(); i++) { 435 for (int i = 0; i < properties()->length(); i++) {
436 ObjectLiteral::Property* property = properties()->at(i); 436 ObjectLiteral::Property* property = properties()->at(i);
437 if (!IsBoilerplateProperty(property)) { 437 if (!IsBoilerplateProperty(property)) {
438 is_simple = false; 438 is_simple = false;
439 continue; 439 continue;
440 } 440 }
441 441
442 if (position == boilerplate_properties_ * 2) { 442 if (position == boilerplate_properties_ * 2) {
443 DCHECK(property->is_computed_name()); 443 DCHECK(property->is_computed_name());
444 is_simple = false;
444 break; 445 break;
445 } 446 }
446 DCHECK(!property->is_computed_name()); 447 DCHECK(!property->is_computed_name());
447 448
448 MaterializedLiteral* m_literal = property->value()->AsMaterializedLiteral(); 449 MaterializedLiteral* m_literal = property->value()->AsMaterializedLiteral();
449 if (m_literal != NULL) { 450 if (m_literal != NULL) {
450 m_literal->BuildConstants(isolate); 451 m_literal->BuildConstants(isolate);
451 if (m_literal->depth() >= depth_acc) depth_acc = m_literal->depth() + 1; 452 if (m_literal->depth() >= depth_acc) depth_acc = m_literal->depth() + 1;
452 } 453 }
453 454
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 bool Literal::Match(void* literal1, void* literal2) { 1146 bool Literal::Match(void* literal1, void* literal2) {
1146 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1147 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1147 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1148 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1148 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 1149 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1149 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1150 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1150 } 1151 }
1151 1152
1152 1153
1153 } // namespace internal 1154 } // namespace internal
1154 } // namespace v8 1155 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | test/mjsunit/harmony/computed-property-names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698