| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) { | 169 void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) { |
| 170 Handle<TypeFeedbackInfo> info = isolate()->factory()->NewTypeFeedbackInfo(); | 170 Handle<TypeFeedbackInfo> info = isolate()->factory()->NewTypeFeedbackInfo(); |
| 171 info->set_ic_total_count(ic_total_count_); | 171 info->set_ic_total_count(ic_total_count_); |
| 172 DCHECK(!isolate()->heap()->InNewSpace(*info)); | 172 DCHECK(!isolate()->heap()->InNewSpace(*info)); |
| 173 code->set_type_feedback_info(*info); | 173 code->set_type_feedback_info(*info); |
| 174 } | 174 } |
| 175 | 175 |
| 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() || !expr->IsFastCloningSupported(); |
| 180 !FastCloneShallowObjectStub::IsSupported(expr); | |
| 181 } | 180 } |
| 182 | 181 |
| 183 | 182 |
| 184 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( | 183 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
| 185 ArrayLiteral* expr) const { | 184 ArrayLiteral* expr) const { |
| 186 return expr->depth() > 1 || | 185 return !expr->IsFastCloningSupported(); |
| 187 expr->values()->length() > JSArray::kInitialMaxFastElementArray; | |
| 188 } | 186 } |
| 189 | 187 |
| 190 void FullCodeGenerator::Initialize(uintptr_t stack_limit) { | 188 void FullCodeGenerator::Initialize(uintptr_t stack_limit) { |
| 191 InitializeAstVisitor(stack_limit); | 189 InitializeAstVisitor(stack_limit); |
| 192 masm_->set_emit_debug_code(FLAG_debug_code); | 190 masm_->set_emit_debug_code(FLAG_debug_code); |
| 193 masm_->set_predictable_code_size(true); | 191 masm_->set_predictable_code_size(true); |
| 194 } | 192 } |
| 195 | 193 |
| 196 void FullCodeGenerator::PrepareForBailout(Expression* node, | 194 void FullCodeGenerator::PrepareForBailout(Expression* node, |
| 197 BailoutState state) { | 195 BailoutState state) { |
| (...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 return info_->has_simple_parameters(); | 1602 return info_->has_simple_parameters(); |
| 1605 } | 1603 } |
| 1606 | 1604 |
| 1607 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1605 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 1608 | 1606 |
| 1609 #undef __ | 1607 #undef __ |
| 1610 | 1608 |
| 1611 | 1609 |
| 1612 } // namespace internal | 1610 } // namespace internal |
| 1613 } // namespace v8 | 1611 } // namespace v8 |
| OLD | NEW |