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.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 literal_flags != ObjectLiteral::kFastElements || | 151 literal_flags != ObjectLiteral::kFastElements || |
152 expr->properties_count() > | 152 expr->properties_count() > |
153 FastCloneShallowObjectStub::kMaximumClonedProperties; | 153 FastCloneShallowObjectStub::kMaximumClonedProperties; |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( | 157 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
158 ArrayLiteral* expr) const { | 158 ArrayLiteral* expr) const { |
159 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub. | 159 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub. |
160 return expr->depth() > 1 || expr->is_strong() || | 160 return expr->depth() > 1 || expr->is_strong() || |
161 expr->values()->length() > JSArray::kInitialMaxFastElementArray; | 161 expr->values()->length() > JSObject::kInitialMaxFastElementArray; |
162 } | 162 } |
163 | 163 |
164 | 164 |
165 void FullCodeGenerator::Initialize() { | 165 void FullCodeGenerator::Initialize() { |
166 InitializeAstVisitor(info_->isolate(), info_->zone()); | 166 InitializeAstVisitor(info_->isolate(), info_->zone()); |
167 // The generation of debug code must match between the snapshot code and the | 167 // The generation of debug code must match between the snapshot code and the |
168 // code that is generated later. This is assumed by the debugger when it is | 168 // code that is generated later. This is assumed by the debugger when it is |
169 // calculating PC offsets after generating a debug version of code. Therefore | 169 // calculating PC offsets after generating a debug version of code. Therefore |
170 // we disable the production of debug code in the full compiler if we are | 170 // we disable the production of debug code in the full compiler if we are |
171 // either generating a snapshot or we booted from a snapshot. | 171 // either generating a snapshot or we booted from a snapshot. |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1608 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1609 var->initializer_position() >= proxy->position(); | 1609 var->initializer_position() >= proxy->position(); |
1610 } | 1610 } |
1611 | 1611 |
1612 | 1612 |
1613 #undef __ | 1613 #undef __ |
1614 | 1614 |
1615 | 1615 |
1616 } // namespace internal | 1616 } // namespace internal |
1617 } // namespace v8 | 1617 } // namespace v8 |
OLD | NEW |