| 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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // TODO(mvstanton): make object literals support COW elements. | 150 // TODO(mvstanton): make object literals support COW elements. |
| 151 return masm()->serializer_enabled() || !expr->fast_elements() || | 151 return masm()->serializer_enabled() || !expr->fast_elements() || |
| 152 !expr->has_shallow_properties() || | 152 !expr->has_shallow_properties() || |
| 153 expr->properties_count() > | 153 expr->properties_count() > |
| 154 FastCloneShallowObjectStub::kMaximumClonedProperties; | 154 FastCloneShallowObjectStub::kMaximumClonedProperties; |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( | 158 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
| 159 ArrayLiteral* expr) const { | 159 ArrayLiteral* expr) const { |
| 160 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub. | 160 return expr->depth() > 1 || |
| 161 return expr->depth() > 1 || expr->is_strong() || | |
| 162 expr->values()->length() > JSArray::kInitialMaxFastElementArray; | 161 expr->values()->length() > JSArray::kInitialMaxFastElementArray; |
| 163 } | 162 } |
| 164 | 163 |
| 165 | 164 |
| 166 void FullCodeGenerator::Initialize() { | 165 void FullCodeGenerator::Initialize() { |
| 167 InitializeAstVisitor(info_->isolate()); | 166 InitializeAstVisitor(info_->isolate()); |
| 168 masm_->set_emit_debug_code(FLAG_debug_code); | 167 masm_->set_emit_debug_code(FLAG_debug_code); |
| 169 masm_->set_predictable_code_size(true); | 168 masm_->set_predictable_code_size(true); |
| 170 } | 169 } |
| 171 | 170 |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1918 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1920 var->initializer_position() >= proxy->position(); | 1919 var->initializer_position() >= proxy->position(); |
| 1921 } | 1920 } |
| 1922 | 1921 |
| 1923 | 1922 |
| 1924 #undef __ | 1923 #undef __ |
| 1925 | 1924 |
| 1926 | 1925 |
| 1927 } // namespace internal | 1926 } // namespace internal |
| 1928 } // namespace v8 | 1927 } // namespace v8 |
| OLD | NEW |