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 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 __ push(Immediate(isolate()->factory()->null_value())); | 1576 __ push(Immediate(isolate()->factory()->null_value())); |
1577 } else { | 1577 } else { |
1578 VisitForStackValue(expression); | 1578 VisitForStackValue(expression); |
1579 } | 1579 } |
1580 } | 1580 } |
1581 | 1581 |
1582 | 1582 |
1583 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1583 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1584 Comment cmnt(masm_, "[ ObjectLiteral"); | 1584 Comment cmnt(masm_, "[ ObjectLiteral"); |
1585 | 1585 |
1586 expr->BuildConstantProperties(isolate()); | |
1587 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1586 Handle<FixedArray> constant_properties = expr->constant_properties(); |
1588 int flags = expr->ComputeFlags(); | 1587 int flags = expr->ComputeFlags(); |
1589 // If any of the keys would store to the elements array, then we shouldn't | 1588 // If any of the keys would store to the elements array, then we shouldn't |
1590 // allow it. | 1589 // allow it. |
1591 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1590 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1592 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1591 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
1593 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); | 1592 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); |
1594 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1593 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
1595 __ push(Immediate(constant_properties)); | 1594 __ push(Immediate(constant_properties)); |
1596 __ push(Immediate(Smi::FromInt(flags))); | 1595 __ push(Immediate(Smi::FromInt(flags))); |
(...skipping 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5437 Assembler::target_address_at(call_target_address, | 5436 Assembler::target_address_at(call_target_address, |
5438 unoptimized_code)); | 5437 unoptimized_code)); |
5439 return OSR_AFTER_STACK_CHECK; | 5438 return OSR_AFTER_STACK_CHECK; |
5440 } | 5439 } |
5441 | 5440 |
5442 | 5441 |
5443 } // namespace internal | 5442 } // namespace internal |
5444 } // namespace v8 | 5443 } // namespace v8 |
5445 | 5444 |
5446 #endif // V8_TARGET_ARCH_IA32 | 5445 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |