| 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/ast.h" | 5 #include "src/ast/ast.h" |
| 6 | 6 |
| 7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
| 8 | 8 |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 if (m_literal != NULL) { | 517 if (m_literal != NULL) { |
| 518 m_literal->BuildConstants(isolate); | 518 m_literal->BuildConstants(isolate); |
| 519 if (m_literal->depth() + 1 > depth_acc) { | 519 if (m_literal->depth() + 1 > depth_acc) { |
| 520 depth_acc = m_literal->depth() + 1; | 520 depth_acc = m_literal->depth() + 1; |
| 521 } | 521 } |
| 522 } | 522 } |
| 523 | 523 |
| 524 // New handle scope here, needs to be after BuildContants(). | 524 // New handle scope here, needs to be after BuildContants(). |
| 525 HandleScope scope(isolate); | 525 HandleScope scope(isolate); |
| 526 Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate); | 526 Handle<Object> boilerplate_value = GetBoilerplateValue(element, isolate); |
| 527 if (boilerplate_value->IsTheHole()) { | 527 if (boilerplate_value->IsTheHole(isolate)) { |
| 528 is_holey = true; | 528 is_holey = true; |
| 529 continue; | 529 continue; |
| 530 } | 530 } |
| 531 | 531 |
| 532 if (boilerplate_value->IsUninitialized()) { | 532 if (boilerplate_value->IsUninitialized()) { |
| 533 boilerplate_value = handle(Smi::FromInt(0), isolate); | 533 boilerplate_value = handle(Smi::FromInt(0), isolate); |
| 534 is_simple = false; | 534 is_simple = false; |
| 535 } | 535 } |
| 536 | 536 |
| 537 JSObject::AddDataElement(array, array_index, boilerplate_value, NONE) | 537 JSObject::AddDataElement(array, array_index, boilerplate_value, NONE) |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 bool Literal::Match(void* literal1, void* literal2) { | 1134 bool Literal::Match(void* literal1, void* literal2) { |
| 1135 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1135 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
| 1136 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1136 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
| 1137 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 1137 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
| 1138 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1138 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 | 1141 |
| 1142 } // namespace internal | 1142 } // namespace internal |
| 1143 } // namespace v8 | 1143 } // namespace v8 |
| OLD | NEW |