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 6899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6910 __ mov(esi, Operand(eax)); | 6910 __ mov(esi, Operand(eax)); |
6911 __ ret(1 * kPointerSize); | 6911 __ ret(1 * kPointerSize); |
6912 | 6912 |
6913 // Need to collect. Call into runtime system. | 6913 // Need to collect. Call into runtime system. |
6914 __ bind(&gc); | 6914 __ bind(&gc); |
6915 __ TailCallRuntime(ExternalReference(Runtime::kNewContext), 1, 1); | 6915 __ TailCallRuntime(ExternalReference(Runtime::kNewContext), 1, 1); |
6916 } | 6916 } |
6917 | 6917 |
6918 | 6918 |
6919 void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) { | 6919 void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) { |
| 6920 // Stack layout on entry: |
| 6921 // |
| 6922 // [esp + kPointerSize]: constant elements. |
| 6923 // [esp + (2 * kPointerSize)]: literal index. |
| 6924 // [esp + (3 * kPointerSize)]: literals array. |
| 6925 |
| 6926 // All sizes here are multiples of kPointerSize. |
6920 int elements_size = (length_ > 0) ? FixedArray::SizeFor(length_) : 0; | 6927 int elements_size = (length_ > 0) ? FixedArray::SizeFor(length_) : 0; |
6921 int size = JSArray::kSize + elements_size; | 6928 int size = JSArray::kSize + elements_size; |
6922 | 6929 |
6923 // Load boilerplate object into ecx and check if we need to create a | 6930 // Load boilerplate object into ecx and check if we need to create a |
6924 // boilerplate. | 6931 // boilerplate. |
6925 Label slow_case; | 6932 Label slow_case; |
6926 __ mov(ecx, Operand(esp, 3 * kPointerSize)); | 6933 __ mov(ecx, Operand(esp, 3 * kPointerSize)); |
6927 __ mov(eax, Operand(esp, 2 * kPointerSize)); | 6934 __ mov(eax, Operand(esp, 2 * kPointerSize)); |
6928 ASSERT((kPointerSize == 4) && (kSmiTagSize == 1) && (kSmiTag == 0)); | 6935 ASSERT((kPointerSize == 4) && (kSmiTagSize == 1) && (kSmiTag == 0)); |
6929 __ mov(ecx, FieldOperand(ecx, eax, times_2, FixedArray::kHeaderSize)); | 6936 __ mov(ecx, FieldOperand(ecx, eax, times_2, FixedArray::kHeaderSize)); |
(...skipping 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10102 | 10109 |
10103 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 10110 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
10104 // tagged as a small integer. | 10111 // tagged as a small integer. |
10105 __ bind(&runtime); | 10112 __ bind(&runtime); |
10106 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 10113 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
10107 } | 10114 } |
10108 | 10115 |
10109 #undef __ | 10116 #undef __ |
10110 | 10117 |
10111 } } // namespace v8::internal | 10118 } } // namespace v8::internal |
OLD | NEW |