| 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 #include "src/v8.h" | 5 #include "src/v8.h" | 
| 6 | 6 | 
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 | 
| 8 | 8 | 
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: | 
| 10 // | 10 // | 
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1075   __ LoadRoot(null_value, Heap::kNullValueRootIndex); | 1075   __ LoadRoot(null_value, Heap::kNullValueRootIndex); | 
| 1076   __ Branch(&exit, eq, a0, Operand(null_value)); | 1076   __ Branch(&exit, eq, a0, Operand(null_value)); | 
| 1077   PrepareForBailoutForId(stmt->PrepareId(), TOS_REG); | 1077   PrepareForBailoutForId(stmt->PrepareId(), TOS_REG); | 
| 1078   __ mov(a0, v0); | 1078   __ mov(a0, v0); | 
| 1079   // Convert the object to a JS object. | 1079   // Convert the object to a JS object. | 
| 1080   Label convert, done_convert; | 1080   Label convert, done_convert; | 
| 1081   __ JumpIfSmi(a0, &convert); | 1081   __ JumpIfSmi(a0, &convert); | 
| 1082   __ GetObjectType(a0, a1, a1); | 1082   __ GetObjectType(a0, a1, a1); | 
| 1083   __ Branch(&done_convert, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); | 1083   __ Branch(&done_convert, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); | 
| 1084   __ bind(&convert); | 1084   __ bind(&convert); | 
| 1085   __ push(a0); | 1085   ToObjectStub stub(masm->isolate()); | 
| 1086   __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 1086   __ CallStub(&stub); | 
| 1087   __ mov(a0, v0); | 1087   __ mov(a0, v0); | 
| 1088   __ bind(&done_convert); | 1088   __ bind(&done_convert); | 
| 1089   PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 1089   PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 
| 1090   __ push(a0); | 1090   __ push(a0); | 
| 1091 | 1091 | 
| 1092   // Check for proxies. | 1092   // Check for proxies. | 
| 1093   Label call_runtime; | 1093   Label call_runtime; | 
| 1094   STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1094   STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 
| 1095   __ GetObjectType(a0, a1, a1); | 1095   __ GetObjectType(a0, a1, a1); | 
| 1096   __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE)); | 1096   __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE)); | 
| (...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4024   // Load the argument into a0 and call the stub. | 4024   // Load the argument into a0 and call the stub. | 
| 4025   VisitForAccumulatorValue(args->at(0)); | 4025   VisitForAccumulatorValue(args->at(0)); | 
| 4026   __ mov(a0, result_register()); | 4026   __ mov(a0, result_register()); | 
| 4027 | 4027 | 
| 4028   NumberToStringStub stub(isolate()); | 4028   NumberToStringStub stub(isolate()); | 
| 4029   __ CallStub(&stub); | 4029   __ CallStub(&stub); | 
| 4030   context()->Plug(v0); | 4030   context()->Plug(v0); | 
| 4031 } | 4031 } | 
| 4032 | 4032 | 
| 4033 | 4033 | 
|  | 4034 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { | 
|  | 4035   ZoneList<Expression*>* args = expr->arguments(); | 
|  | 4036   DCHECK_EQ(1, args->length()); | 
|  | 4037 | 
|  | 4038   // Load the argument into a0 and convert it. | 
|  | 4039   VisitForAccumulatorValue(args->at(0)); | 
|  | 4040   __ mov(a0, result_register()); | 
|  | 4041 | 
|  | 4042   ToObjectStub stub(isolate()); | 
|  | 4043   __ CallStub(&stub); | 
|  | 4044   context()->Plug(v0); | 
|  | 4045 } | 
|  | 4046 | 
|  | 4047 | 
| 4034 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 4048 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | 
| 4035   ZoneList<Expression*>* args = expr->arguments(); | 4049   ZoneList<Expression*>* args = expr->arguments(); | 
| 4036   DCHECK(args->length() == 1); | 4050   DCHECK(args->length() == 1); | 
| 4037 | 4051 | 
| 4038   VisitForAccumulatorValue(args->at(0)); | 4052   VisitForAccumulatorValue(args->at(0)); | 
| 4039 | 4053 | 
| 4040   Label done; | 4054   Label done; | 
| 4041   StringCharFromCodeGenerator generator(v0, a1); | 4055   StringCharFromCodeGenerator generator(v0, a1); | 
| 4042   generator.GenerateFast(masm_); | 4056   generator.GenerateFast(masm_); | 
| 4043   __ jmp(&done); | 4057   __ jmp(&done); | 
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5427          reinterpret_cast<uint64_t>( | 5441          reinterpret_cast<uint64_t>( | 
| 5428              isolate->builtins()->OsrAfterStackCheck()->entry())); | 5442              isolate->builtins()->OsrAfterStackCheck()->entry())); | 
| 5429   return OSR_AFTER_STACK_CHECK; | 5443   return OSR_AFTER_STACK_CHECK; | 
| 5430 } | 5444 } | 
| 5431 | 5445 | 
| 5432 | 5446 | 
| 5433 }  // namespace internal | 5447 }  // namespace internal | 
| 5434 }  // namespace v8 | 5448 }  // namespace v8 | 
| 5435 | 5449 | 
| 5436 #endif  // V8_TARGET_ARCH_MIPS64 | 5450 #endif  // V8_TARGET_ARCH_MIPS64 | 
| OLD | NEW | 
|---|