OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void ToNumberStub::InitializeInterfaceDescriptor( | 53 void ToNumberStub::InitializeInterfaceDescriptor( |
54 Isolate* isolate, | 54 Isolate* isolate, |
55 CodeStubInterfaceDescriptor* descriptor) { | 55 CodeStubInterfaceDescriptor* descriptor) { |
56 static Register registers[] = { a0 }; | 56 static Register registers[] = { a0 }; |
57 descriptor->register_param_count_ = 1; | 57 descriptor->register_param_count_ = 1; |
58 descriptor->register_params_ = registers; | 58 descriptor->register_params_ = registers; |
59 descriptor->deoptimization_handler_ = NULL; | 59 descriptor->deoptimization_handler_ = NULL; |
60 } | 60 } |
61 | 61 |
62 | 62 |
| 63 void NumberToStringStub::InitializeInterfaceDescriptor( |
| 64 Isolate* isolate, |
| 65 CodeStubInterfaceDescriptor* descriptor) { |
| 66 static Register registers[] = { a0 }; |
| 67 descriptor->register_param_count_ = 1; |
| 68 descriptor->register_params_ = registers; |
| 69 descriptor->deoptimization_handler_ = NULL; |
| 70 } |
| 71 |
| 72 |
63 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 73 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
64 Isolate* isolate, | 74 Isolate* isolate, |
65 CodeStubInterfaceDescriptor* descriptor) { | 75 CodeStubInterfaceDescriptor* descriptor) { |
66 static Register registers[] = { a3, a2, a1 }; | 76 static Register registers[] = { a3, a2, a1 }; |
67 descriptor->register_param_count_ = 3; | 77 descriptor->register_param_count_ = 3; |
68 descriptor->register_params_ = registers; | 78 descriptor->register_params_ = registers; |
69 descriptor->deoptimization_handler_ = | 79 descriptor->deoptimization_handler_ = |
70 Runtime::FunctionForId(Runtime::kCreateArrayLiteralShallow)->entry; | 80 Runtime::FunctionForId(Runtime::kCreateArrayLiteralShallow)->entry; |
71 } | 81 } |
72 | 82 |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 __ lw(a3, FieldMemOperand(lhs, HeapObject::kMapOffset)); | 997 __ lw(a3, FieldMemOperand(lhs, HeapObject::kMapOffset)); |
988 __ lbu(a2, FieldMemOperand(a2, Map::kBitFieldOffset)); | 998 __ lbu(a2, FieldMemOperand(a2, Map::kBitFieldOffset)); |
989 __ lbu(a3, FieldMemOperand(a3, Map::kBitFieldOffset)); | 999 __ lbu(a3, FieldMemOperand(a3, Map::kBitFieldOffset)); |
990 __ and_(a0, a2, a3); | 1000 __ and_(a0, a2, a3); |
991 __ And(a0, a0, Operand(1 << Map::kIsUndetectable)); | 1001 __ And(a0, a0, Operand(1 << Map::kIsUndetectable)); |
992 __ Ret(USE_DELAY_SLOT); | 1002 __ Ret(USE_DELAY_SLOT); |
993 __ xori(v0, a0, 1 << Map::kIsUndetectable); | 1003 __ xori(v0, a0, 1 << Map::kIsUndetectable); |
994 } | 1004 } |
995 | 1005 |
996 | 1006 |
997 void NumberToStringStub::Generate(MacroAssembler* masm) { | |
998 Label runtime; | |
999 | |
1000 __ lw(a1, MemOperand(sp, 0)); | |
1001 | |
1002 // Generate code to lookup number in the number string cache. | |
1003 __ LookupNumberStringCache(a1, v0, a2, a3, t0, &runtime); | |
1004 __ DropAndRet(1); | |
1005 | |
1006 __ bind(&runtime); | |
1007 // Handle number to string in the runtime system if not found in the cache. | |
1008 __ TailCallRuntime(Runtime::kNumberToString, 1, 1); | |
1009 } | |
1010 | |
1011 | |
1012 static void ICCompareStub_CheckInputType(MacroAssembler* masm, | 1007 static void ICCompareStub_CheckInputType(MacroAssembler* masm, |
1013 Register input, | 1008 Register input, |
1014 Register scratch, | 1009 Register scratch, |
1015 CompareIC::State expected, | 1010 CompareIC::State expected, |
1016 Label* fail) { | 1011 Label* fail) { |
1017 Label ok; | 1012 Label ok; |
1018 if (expected == CompareIC::SMI) { | 1013 if (expected == CompareIC::SMI) { |
1019 __ JumpIfNotSmi(input, fail); | 1014 __ JumpIfNotSmi(input, fail); |
1020 } else if (expected == CompareIC::NUMBER) { | 1015 } else if (expected == CompareIC::NUMBER) { |
1021 __ JumpIfSmi(input, &ok); | 1016 __ JumpIfSmi(input, &ok); |
(...skipping 6168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7190 __ bind(&fast_elements_case); | 7185 __ bind(&fast_elements_case); |
7191 GenerateCase(masm, FAST_ELEMENTS); | 7186 GenerateCase(masm, FAST_ELEMENTS); |
7192 } | 7187 } |
7193 | 7188 |
7194 | 7189 |
7195 #undef __ | 7190 #undef __ |
7196 | 7191 |
7197 } } // namespace v8::internal | 7192 } } // namespace v8::internal |
7198 | 7193 |
7199 #endif // V8_TARGET_ARCH_MIPS | 7194 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |