OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4943 // Allocates a heap number or jumps to the label if the young space is full and | 4943 // Allocates a heap number or jumps to the label if the young space is full and |
4944 // a scavenge is needed. | 4944 // a scavenge is needed. |
4945 static void AllocateHeapNumber( | 4945 static void AllocateHeapNumber( |
4946 MacroAssembler* masm, | 4946 MacroAssembler* masm, |
4947 Label* need_gc, // Jump here if young space is full. | 4947 Label* need_gc, // Jump here if young space is full. |
4948 Register result, // The tagged address of the new heap number. | 4948 Register result, // The tagged address of the new heap number. |
4949 Register scratch1, // A scratch register. | 4949 Register scratch1, // A scratch register. |
4950 Register scratch2) { // Another scratch register. | 4950 Register scratch2) { // Another scratch register. |
4951 // Allocate an object in the heap for the heap number and tag it as a heap | 4951 // Allocate an object in the heap for the heap number and tag it as a heap |
4952 // object. | 4952 // object. |
4953 __ AllocateObjectInNewSpace(HeapNumber::kSize, | 4953 __ AllocateObjectInNewSpace(HeapNumber::kSize / kPointerSize, |
4954 result, | 4954 result, |
4955 scratch1, | 4955 scratch1, |
4956 scratch2, | 4956 scratch2, |
4957 need_gc, | 4957 need_gc, |
4958 true); | 4958 true); |
4959 | 4959 |
4960 // Get heap number map and store it in the allocated object. | 4960 // Get heap number map and store it in the allocated object. |
4961 __ LoadRoot(scratch1, Heap::kHeapNumberMapRootIndex); | 4961 __ LoadRoot(scratch1, Heap::kHeapNumberMapRootIndex); |
4962 __ str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset)); | 4962 __ str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset)); |
4963 } | 4963 } |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6251 int CompareStub::MinorKey() { | 6251 int CompareStub::MinorKey() { |
6252 // Encode the two parameters in a unique 16 bit value. | 6252 // Encode the two parameters in a unique 16 bit value. |
6253 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); | 6253 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); |
6254 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); | 6254 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); |
6255 } | 6255 } |
6256 | 6256 |
6257 | 6257 |
6258 #undef __ | 6258 #undef __ |
6259 | 6259 |
6260 } } // namespace v8::internal | 6260 } } // namespace v8::internal |
OLD | NEW |