| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 | 
| 6 | 6 | 
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 
| 8 | 8 | 
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" | 
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" | 
| (...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2325   Register input = ToRegister(instr->value()); | 2325   Register input = ToRegister(instr->value()); | 
| 2326 | 2326 | 
| 2327   if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 2327   if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 
| 2328     __ JumpIfSmi(input, instr->FalseLabel(chunk_)); | 2328     __ JumpIfSmi(input, instr->FalseLabel(chunk_)); | 
| 2329   } | 2329   } | 
| 2330 | 2330 | 
| 2331   __ CmpObjectType(input, TestType(instr->hydrogen()), kScratchRegister); | 2331   __ CmpObjectType(input, TestType(instr->hydrogen()), kScratchRegister); | 
| 2332   EmitBranch(instr, BranchCondition(instr->hydrogen())); | 2332   EmitBranch(instr, BranchCondition(instr->hydrogen())); | 
| 2333 } | 2333 } | 
| 2334 | 2334 | 
| 2335 |  | 
| 2336 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { |  | 
| 2337   Register input = ToRegister(instr->value()); |  | 
| 2338   Register result = ToRegister(instr->result()); |  | 
| 2339 |  | 
| 2340   __ AssertString(input); |  | 
| 2341 |  | 
| 2342   __ movl(result, FieldOperand(input, String::kHashFieldOffset)); |  | 
| 2343   DCHECK(String::kHashShift >= kSmiTagSize); |  | 
| 2344   __ IndexFromHash(result, result); |  | 
| 2345 } |  | 
| 2346 |  | 
| 2347 |  | 
| 2348 void LCodeGen::DoHasCachedArrayIndexAndBranch( |  | 
| 2349     LHasCachedArrayIndexAndBranch* instr) { |  | 
| 2350   Register input = ToRegister(instr->value()); |  | 
| 2351 |  | 
| 2352   __ testl(FieldOperand(input, String::kHashFieldOffset), |  | 
| 2353            Immediate(String::kContainsCachedArrayIndexMask)); |  | 
| 2354   EmitBranch(instr, equal); |  | 
| 2355 } |  | 
| 2356 |  | 
| 2357 |  | 
| 2358 // Branches to a label or falls through with the answer in the z flag. | 2335 // Branches to a label or falls through with the answer in the z flag. | 
| 2359 // Trashes the temp register. | 2336 // Trashes the temp register. | 
| 2360 void LCodeGen::EmitClassOfTest(Label* is_true, | 2337 void LCodeGen::EmitClassOfTest(Label* is_true, | 
| 2361                                Label* is_false, | 2338                                Label* is_false, | 
| 2362                                Handle<String> class_name, | 2339                                Handle<String> class_name, | 
| 2363                                Register input, | 2340                                Register input, | 
| 2364                                Register temp, | 2341                                Register temp, | 
| 2365                                Register temp2) { | 2342                                Register temp2) { | 
| 2366   DCHECK(!input.is(temp)); | 2343   DCHECK(!input.is(temp)); | 
| 2367   DCHECK(!input.is(temp2)); | 2344   DCHECK(!input.is(temp2)); | 
| (...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5467   __ bind(deferred->exit()); | 5444   __ bind(deferred->exit()); | 
| 5468   __ bind(&done); | 5445   __ bind(&done); | 
| 5469 } | 5446 } | 
| 5470 | 5447 | 
| 5471 #undef __ | 5448 #undef __ | 
| 5472 | 5449 | 
| 5473 }  // namespace internal | 5450 }  // namespace internal | 
| 5474 }  // namespace v8 | 5451 }  // namespace v8 | 
| 5475 | 5452 | 
| 5476 #endif  // V8_TARGET_ARCH_X64 | 5453 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|