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-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( | 177 bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( |
178 ObjectLiteral* expr) const { | 178 ObjectLiteral* expr) const { |
179 return masm()->serializer_enabled() || | 179 return masm()->serializer_enabled() || |
180 !FastCloneShallowObjectStub::IsSupported(expr); | 180 !FastCloneShallowObjectStub::IsSupported(expr); |
181 } | 181 } |
182 | 182 |
183 | 183 |
184 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( | 184 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
185 ArrayLiteral* expr) const { | 185 ArrayLiteral* expr) const { |
186 return expr->depth() > 1 || | 186 return !FastCloneShallowArrayStub::IsSupported(expr); |
187 expr->values()->length() > JSArray::kInitialMaxFastElementArray; | |
188 } | 187 } |
189 | 188 |
190 void FullCodeGenerator::Initialize(uintptr_t stack_limit) { | 189 void FullCodeGenerator::Initialize(uintptr_t stack_limit) { |
191 InitializeAstVisitor(stack_limit); | 190 InitializeAstVisitor(stack_limit); |
192 masm_->set_emit_debug_code(FLAG_debug_code); | 191 masm_->set_emit_debug_code(FLAG_debug_code); |
193 masm_->set_predictable_code_size(true); | 192 masm_->set_predictable_code_size(true); |
194 } | 193 } |
195 | 194 |
196 void FullCodeGenerator::PrepareForBailout(Expression* node, | 195 void FullCodeGenerator::PrepareForBailout(Expression* node, |
197 BailoutState state) { | 196 BailoutState state) { |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 return info_->has_simple_parameters(); | 1603 return info_->has_simple_parameters(); |
1605 } | 1604 } |
1606 | 1605 |
1607 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1606 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
1608 | 1607 |
1609 #undef __ | 1608 #undef __ |
1610 | 1609 |
1611 | 1610 |
1612 } // namespace internal | 1611 } // namespace internal |
1613 } // namespace v8 | 1612 } // namespace v8 |
OLD | NEW |