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/v8.h" | 5 #include "src/v8.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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 return masm()->serializer_enabled() || | 405 return masm()->serializer_enabled() || |
406 literal_flags != ObjectLiteral::kShallowProperties || | 406 literal_flags != ObjectLiteral::kShallowProperties || |
407 literal_flags != ObjectLiteral::kFastElements || | 407 literal_flags != ObjectLiteral::kFastElements || |
408 expr->properties_count() > | 408 expr->properties_count() > |
409 FastCloneShallowObjectStub::kMaximumClonedProperties; | 409 FastCloneShallowObjectStub::kMaximumClonedProperties; |
410 } | 410 } |
411 | 411 |
412 | 412 |
413 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( | 413 bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( |
414 ArrayLiteral* expr) const { | 414 ArrayLiteral* expr) const { |
415 return expr->depth() > 1 || | 415 // TODO(rossberg): Teach strong mode to FastCloneShallowArrayStub. |
| 416 return expr->depth() > 1 || expr->is_strong() || |
416 expr->values()->length() > JSObject::kInitialMaxFastElementArray; | 417 expr->values()->length() > JSObject::kInitialMaxFastElementArray; |
417 } | 418 } |
418 | 419 |
419 | 420 |
420 void FullCodeGenerator::Initialize() { | 421 void FullCodeGenerator::Initialize() { |
421 InitializeAstVisitor(info_->isolate(), info_->zone()); | 422 InitializeAstVisitor(info_->isolate(), info_->zone()); |
422 // The generation of debug code must match between the snapshot code and the | 423 // The generation of debug code must match between the snapshot code and the |
423 // code that is generated later. This is assumed by the debugger when it is | 424 // code that is generated later. This is assumed by the debugger when it is |
424 // calculating PC offsets after generating a debug version of code. Therefore | 425 // calculating PC offsets after generating a debug version of code. Therefore |
425 // we disable the production of debug code in the full compiler if we are | 426 // we disable the production of debug code in the full compiler if we are |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1637 } | 1638 } |
1638 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1639 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
1639 codegen_->scope_ = saved_scope_; | 1640 codegen_->scope_ = saved_scope_; |
1640 } | 1641 } |
1641 | 1642 |
1642 | 1643 |
1643 #undef __ | 1644 #undef __ |
1644 | 1645 |
1645 | 1646 |
1646 } } // namespace v8::internal | 1647 } } // namespace v8::internal |
OLD | NEW |