OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 | 1605 |
1606 expr->BuildConstantProperties(isolate()); | 1606 expr->BuildConstantProperties(isolate()); |
1607 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1607 Handle<FixedArray> constant_properties = expr->constant_properties(); |
1608 int flags = expr->fast_elements() | 1608 int flags = expr->fast_elements() |
1609 ? ObjectLiteral::kFastElements | 1609 ? ObjectLiteral::kFastElements |
1610 : ObjectLiteral::kNoFlags; | 1610 : ObjectLiteral::kNoFlags; |
1611 flags |= expr->has_function() | 1611 flags |= expr->has_function() |
1612 ? ObjectLiteral::kHasFunction | 1612 ? ObjectLiteral::kHasFunction |
1613 : ObjectLiteral::kNoFlags; | 1613 : ObjectLiteral::kNoFlags; |
1614 int properties_count = constant_properties->length() / 2; | 1614 int properties_count = constant_properties->length() / 2; |
1615 if ((FLAG_track_double_fields && expr->may_store_doubles()) || | 1615 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || |
1616 expr->depth() > 1 || Serializer::enabled() || | |
1617 flags != ObjectLiteral::kFastElements || | 1616 flags != ObjectLiteral::kFastElements || |
1618 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { | 1617 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |
1619 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1618 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
1620 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); | 1619 __ push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); |
1621 __ Push(Smi::FromInt(expr->literal_index())); | 1620 __ Push(Smi::FromInt(expr->literal_index())); |
1622 __ Push(constant_properties); | 1621 __ Push(constant_properties); |
1623 __ Push(Smi::FromInt(flags)); | 1622 __ Push(Smi::FromInt(flags)); |
1624 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1623 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
1625 } else { | 1624 } else { |
1626 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1625 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
(...skipping 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4907 | 4906 |
4908 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4907 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4909 Assembler::target_address_at(call_target_address)); | 4908 Assembler::target_address_at(call_target_address)); |
4910 return OSR_AFTER_STACK_CHECK; | 4909 return OSR_AFTER_STACK_CHECK; |
4911 } | 4910 } |
4912 | 4911 |
4913 | 4912 |
4914 } } // namespace v8::internal | 4913 } } // namespace v8::internal |
4915 | 4914 |
4916 #endif // V8_TARGET_ARCH_X64 | 4915 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |