Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 534 Expression* element = values()->at(array_index); | 534 Expression* element = values()->at(array_index); |
| 535 if (element->IsSpread()) break; | 535 if (element->IsSpread()) break; |
| 536 MaterializedLiteral* m_literal = element->AsMaterializedLiteral(); | 536 MaterializedLiteral* m_literal = element->AsMaterializedLiteral(); |
| 537 if (m_literal != NULL) { | 537 if (m_literal != NULL) { |
| 538 m_literal->BuildConstants(isolate); | 538 m_literal->BuildConstants(isolate); |
| 539 if (m_literal->depth() + 1 > depth_acc) { | 539 if (m_literal->depth() + 1 > depth_acc) { |
| 540 depth_acc = m_literal->depth() + 1; | 540 depth_acc = m_literal->depth() + 1; |
| 541 } | 541 } |
| 542 } | 542 } |
| 543 Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate); | 543 Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate); |
| 544 | 544 HandleScope scope(isolate); |
|
Erik Corry Chromium.org
2015/06/15 09:42:58
Please add comment explaining why this can't be mo
oth
2015/06/15 13:34:03
Done.
| |
| 545 if (boilerplate_value->IsTheHole()) { | 545 if (boilerplate_value->IsTheHole()) { |
| 546 is_holey = true; | 546 is_holey = true; |
| 547 continue; | 547 continue; |
| 548 } | 548 } |
| 549 | 549 |
| 550 if (boilerplate_value->IsUninitialized()) { | 550 if (boilerplate_value->IsUninitialized()) { |
| 551 boilerplate_value = handle(Smi::FromInt(0), isolate); | 551 boilerplate_value = handle(Smi::FromInt(0), isolate); |
| 552 is_simple = false; | 552 is_simple = false; |
| 553 } | 553 } |
| 554 | 554 |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1158 bool Literal::Match(void* literal1, void* literal2) { | 1158 bool Literal::Match(void* literal1, void* literal2) { |
| 1159 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1159 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
| 1160 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1160 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
| 1161 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 1161 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
| 1162 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1162 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 | 1165 |
| 1166 } // namespace internal | 1166 } // namespace internal |
| 1167 } // namespace v8 | 1167 } // namespace v8 |
| OLD | NEW |