| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 __ push(Immediate(isolate()->factory()->null_value())); | 1570 __ push(Immediate(isolate()->factory()->null_value())); |
| 1571 } else { | 1571 } else { |
| 1572 VisitForStackValue(expression); | 1572 VisitForStackValue(expression); |
| 1573 } | 1573 } |
| 1574 } | 1574 } |
| 1575 | 1575 |
| 1576 | 1576 |
| 1577 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1577 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
| 1578 Comment cmnt(masm_, "[ ObjectLiteral"); | 1578 Comment cmnt(masm_, "[ ObjectLiteral"); |
| 1579 | 1579 |
| 1580 expr->BuildConstantProperties(isolate()); | |
| 1581 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1580 Handle<FixedArray> constant_properties = expr->constant_properties(); |
| 1582 int flags = expr->ComputeFlags(); | 1581 int flags = expr->ComputeFlags(); |
| 1583 // If any of the keys would store to the elements array, then we shouldn't | 1582 // If any of the keys would store to the elements array, then we shouldn't |
| 1584 // allow it. | 1583 // allow it. |
| 1585 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1584 if (MustCreateObjectLiteralWithRuntime(expr)) { |
| 1586 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1585 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1587 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); | 1586 __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); |
| 1588 __ push(Immediate(Smi::FromInt(expr->literal_index()))); | 1587 __ push(Immediate(Smi::FromInt(expr->literal_index()))); |
| 1589 __ push(Immediate(constant_properties)); | 1588 __ push(Immediate(constant_properties)); |
| 1590 __ push(Immediate(Smi::FromInt(flags))); | 1589 __ push(Immediate(Smi::FromInt(flags))); |
| (...skipping 3837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5428 Assembler::target_address_at(call_target_address, | 5427 Assembler::target_address_at(call_target_address, |
| 5429 unoptimized_code)); | 5428 unoptimized_code)); |
| 5430 return OSR_AFTER_STACK_CHECK; | 5429 return OSR_AFTER_STACK_CHECK; |
| 5431 } | 5430 } |
| 5432 | 5431 |
| 5433 | 5432 |
| 5434 } // namespace internal | 5433 } // namespace internal |
| 5435 } // namespace v8 | 5434 } // namespace v8 |
| 5436 | 5435 |
| 5437 #endif // V8_TARGET_ARCH_X87 | 5436 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |