| 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 #if V8_TARGET_ARCH_MIPS |     5 #if V8_TARGET_ARCH_MIPS | 
|     6  |     6  | 
|     7 // Note on Mips implementation: |     7 // Note on Mips implementation: | 
|     8 // |     8 // | 
|     9 // The result_register() for mips is the 'v0' register, which is defined |     9 // The result_register() for mips is the 'v0' register, which is defined | 
|    10 // by the ABI to contain function return values. However, the first |    10 // by the ABI to contain function return values. However, the first | 
| (...skipping 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3120   __ Addu(at, |  3120   __ Addu(at, | 
|  3121           string, |  3121           string, | 
|  3122           Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); |  3122           Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); | 
|  3123   __ Addu(at, at, index); |  3123   __ Addu(at, at, index); | 
|  3124   STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); |  3124   STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); | 
|  3125   __ sh(value, MemOperand(at)); |  3125   __ sh(value, MemOperand(at)); | 
|  3126     context()->Plug(string); |  3126     context()->Plug(string); | 
|  3127 } |  3127 } | 
|  3128  |  3128  | 
|  3129  |  3129  | 
|  3130 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |  | 
|  3131   ZoneList<Expression*>* args = expr->arguments(); |  | 
|  3132   DCHECK_EQ(1, args->length()); |  | 
|  3133  |  | 
|  3134   // Load the argument into v0 and convert it. |  | 
|  3135   VisitForAccumulatorValue(args->at(0)); |  | 
|  3136  |  | 
|  3137   // Convert the object to an integer. |  | 
|  3138   Label done_convert; |  | 
|  3139   __ JumpIfSmi(v0, &done_convert); |  | 
|  3140   __ Push(v0); |  | 
|  3141   __ CallRuntime(Runtime::kToInteger); |  | 
|  3142   __ bind(&done_convert); |  | 
|  3143   context()->Plug(v0); |  | 
|  3144 } |  | 
|  3145  |  | 
|  3146  |  | 
|  3147 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |  3130 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 
|  3148   ZoneList<Expression*>* args = expr->arguments(); |  3131   ZoneList<Expression*>* args = expr->arguments(); | 
|  3149   DCHECK(args->length() == 1); |  3132   DCHECK(args->length() == 1); | 
|  3150  |  3133  | 
|  3151   VisitForAccumulatorValue(args->at(0)); |  3134   VisitForAccumulatorValue(args->at(0)); | 
|  3152  |  3135  | 
|  3153   Label done; |  3136   Label done; | 
|  3154   StringCharFromCodeGenerator generator(v0, a1); |  3137   StringCharFromCodeGenerator generator(v0, a1); | 
|  3155   generator.GenerateFast(masm_); |  3138   generator.GenerateFast(masm_); | 
|  3156   __ jmp(&done); |  3139   __ jmp(&done); | 
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4119          reinterpret_cast<uint32_t>( |  4102          reinterpret_cast<uint32_t>( | 
|  4120              isolate->builtins()->OnStackReplacement()->entry())); |  4103              isolate->builtins()->OnStackReplacement()->entry())); | 
|  4121   return ON_STACK_REPLACEMENT; |  4104   return ON_STACK_REPLACEMENT; | 
|  4122 } |  4105 } | 
|  4123  |  4106  | 
|  4124  |  4107  | 
|  4125 }  // namespace internal |  4108 }  // namespace internal | 
|  4126 }  // namespace v8 |  4109 }  // namespace v8 | 
|  4127  |  4110  | 
|  4128 #endif  // V8_TARGET_ARCH_MIPS |  4111 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW |