OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2634 } else if (length > FastCloneShallowArrayStub::kMaximumLength) { | 2634 } else if (length > FastCloneShallowArrayStub::kMaximumLength) { |
2635 clone = frame_->CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); | 2635 clone = frame_->CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); |
2636 } else { | 2636 } else { |
2637 FastCloneShallowArrayStub stub(length); | 2637 FastCloneShallowArrayStub stub(length); |
2638 clone = frame_->CallStub(&stub, 3); | 2638 clone = frame_->CallStub(&stub, 3); |
2639 } | 2639 } |
2640 frame_->Push(&clone); | 2640 frame_->Push(&clone); |
2641 | 2641 |
2642 // Generate code to set the elements in the array that are not | 2642 // Generate code to set the elements in the array that are not |
2643 // literals. | 2643 // literals. |
2644 for (int i = 0; i < node->values()->length(); i++) { | 2644 for (int i = 0; i < length; i++) { |
2645 Expression* value = node->values()->at(i); | 2645 Expression* value = node->values()->at(i); |
2646 | 2646 |
2647 // If value is a literal the property value is already set in the | 2647 // If value is a literal the property value is already set in the |
2648 // boilerplate object. | 2648 // boilerplate object. |
2649 if (value->AsLiteral() != NULL) continue; | 2649 if (value->AsLiteral() != NULL) continue; |
2650 // If value is a materialized literal the property value is already set | 2650 // If value is a materialized literal the property value is already set |
2651 // in the boilerplate object if it is simple. | 2651 // in the boilerplate object if it is simple. |
2652 if (CompileTimeValue::IsCompileTimeValue(value)) continue; | 2652 if (CompileTimeValue::IsCompileTimeValue(value)) continue; |
2653 | 2653 |
2654 // The property must be set by generated code. | 2654 // The property must be set by generated code. |
(...skipping 9236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11891 } | 11891 } |
11892 | 11892 |
11893 #endif | 11893 #endif |
11894 | 11894 |
11895 | 11895 |
11896 #undef __ | 11896 #undef __ |
11897 | 11897 |
11898 } } // namespace v8::internal | 11898 } } // namespace v8::internal |
11899 | 11899 |
11900 #endif // V8_TARGET_ARCH_X64 | 11900 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |