| 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 11 matching lines...) Expand all Loading... |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #if defined(V8_TARGET_ARCH_IA32) | 30 #if defined(V8_TARGET_ARCH_IA32) |
| 31 | 31 |
| 32 #include "code-stubs.h" |
| 32 #include "bootstrapper.h" | 33 #include "bootstrapper.h" |
| 33 #include "code-stubs-ia32.h" | 34 #include "jsregexp.h" |
| 34 #include "codegen-inl.h" | |
| 35 #include "regexp-macro-assembler.h" | 35 #include "regexp-macro-assembler.h" |
| 36 | 36 |
| 37 namespace v8 { | 37 namespace v8 { |
| 38 namespace internal { | 38 namespace internal { |
| 39 | 39 |
| 40 #define __ ACCESS_MASM(masm) | 40 #define __ ACCESS_MASM(masm) |
| 41 void FastNewClosureStub::Generate(MacroAssembler* masm) { | 41 void FastNewClosureStub::Generate(MacroAssembler* masm) { |
| 42 // Create a new closure from the given function info in new | 42 // Create a new closure from the given function info in new |
| 43 // space. Set the context to the current context in esi. | 43 // space. Set the context to the current context in esi. |
| 44 Label gc; | 44 Label gc; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 int size = JSArray::kSize + elements_size; | 142 int size = JSArray::kSize + elements_size; |
| 143 | 143 |
| 144 // Load boilerplate object into ecx and check if we need to create a | 144 // Load boilerplate object into ecx and check if we need to create a |
| 145 // boilerplate. | 145 // boilerplate. |
| 146 Label slow_case; | 146 Label slow_case; |
| 147 __ mov(ecx, Operand(esp, 3 * kPointerSize)); | 147 __ mov(ecx, Operand(esp, 3 * kPointerSize)); |
| 148 __ mov(eax, Operand(esp, 2 * kPointerSize)); | 148 __ mov(eax, Operand(esp, 2 * kPointerSize)); |
| 149 STATIC_ASSERT(kPointerSize == 4); | 149 STATIC_ASSERT(kPointerSize == 4); |
| 150 STATIC_ASSERT(kSmiTagSize == 1); | 150 STATIC_ASSERT(kSmiTagSize == 1); |
| 151 STATIC_ASSERT(kSmiTag == 0); | 151 STATIC_ASSERT(kSmiTag == 0); |
| 152 __ mov(ecx, CodeGenerator::FixedArrayElementOperand(ecx, eax)); | 152 __ mov(ecx, FieldOperand(ecx, eax, times_half_pointer_size, |
| 153 FixedArray::kHeaderSize)); |
| 153 __ cmp(ecx, Factory::undefined_value()); | 154 __ cmp(ecx, Factory::undefined_value()); |
| 154 __ j(equal, &slow_case); | 155 __ j(equal, &slow_case); |
| 155 | 156 |
| 156 if (FLAG_debug_code) { | 157 if (FLAG_debug_code) { |
| 157 const char* message; | 158 const char* message; |
| 158 Handle<Map> expected_map; | 159 Handle<Map> expected_map; |
| 159 if (mode_ == CLONE_ELEMENTS) { | 160 if (mode_ == CLONE_ELEMENTS) { |
| 160 message = "Expected (writable) fixed array"; | 161 message = "Expected (writable) fixed array"; |
| 161 expected_map = Factory::fixed_array_map(); | 162 expected_map = Factory::fixed_array_map(); |
| 162 } else { | 163 } else { |
| (...skipping 4367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4530 // tagged as a small integer. | 4531 // tagged as a small integer. |
| 4531 __ bind(&runtime); | 4532 __ bind(&runtime); |
| 4532 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 4533 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
| 4533 } | 4534 } |
| 4534 | 4535 |
| 4535 #undef __ | 4536 #undef __ |
| 4536 | 4537 |
| 4537 } } // namespace v8::internal | 4538 } } // namespace v8::internal |
| 4538 | 4539 |
| 4539 #endif // V8_TARGET_ARCH_IA32 | 4540 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |