Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1948 return eq; | 1948 return eq; |
| 1949 } | 1949 } |
| 1950 | 1950 |
| 1951 | 1951 |
| 1952 void LCodeGen::DoHasInstanceType(LHasInstanceType* instr) { | 1952 void LCodeGen::DoHasInstanceType(LHasInstanceType* instr) { |
| 1953 Register input = ToRegister(instr->InputAt(0)); | 1953 Register input = ToRegister(instr->InputAt(0)); |
| 1954 Register result = ToRegister(instr->result()); | 1954 Register result = ToRegister(instr->result()); |
| 1955 | 1955 |
| 1956 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); | 1956 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); |
| 1957 Label done; | 1957 Label done; |
| 1958 // TODO(jkummerow): Would like to replace this by JumpIfSmi(), but it's | |
| 1959 // non-trivial. | |
| 1960 __ tst(input, Operand(kSmiTagMask)); | |
|
Do not use this email for V8
2011/06/20 12:41:46
The comment isn't necessary, or it could just say
Søren Thygesen Gjesse
2011/06/21 10:03:02
Can't we just have a macro assembler instruction T
| |
| 1958 __ LoadRoot(result, Heap::kFalseValueRootIndex, eq); | 1961 __ LoadRoot(result, Heap::kFalseValueRootIndex, eq); |
| 1959 __ JumpIfSmi(input, &done); | 1962 __ b(eq, &done); |
| 1960 __ CompareObjectType(input, result, result, TestType(instr->hydrogen())); | 1963 __ CompareObjectType(input, result, result, TestType(instr->hydrogen())); |
| 1961 Condition cond = BranchCondition(instr->hydrogen()); | 1964 Condition cond = BranchCondition(instr->hydrogen()); |
| 1962 __ LoadRoot(result, Heap::kTrueValueRootIndex, cond); | 1965 __ LoadRoot(result, Heap::kTrueValueRootIndex, cond); |
| 1963 __ LoadRoot(result, Heap::kFalseValueRootIndex, NegateCondition(cond)); | 1966 __ LoadRoot(result, Heap::kFalseValueRootIndex, NegateCondition(cond)); |
| 1964 __ bind(&done); | 1967 __ bind(&done); |
| 1965 } | 1968 } |
| 1966 | 1969 |
| 1967 | 1970 |
| 1968 void LCodeGen::DoHasInstanceTypeAndBranch(LHasInstanceTypeAndBranch* instr) { | 1971 void LCodeGen::DoHasInstanceTypeAndBranch(LHasInstanceTypeAndBranch* instr) { |
| 1969 Register scratch = scratch0(); | 1972 Register scratch = scratch0(); |
| (...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4581 ASSERT(osr_pc_offset_ == -1); | 4584 ASSERT(osr_pc_offset_ == -1); |
| 4582 osr_pc_offset_ = masm()->pc_offset(); | 4585 osr_pc_offset_ = masm()->pc_offset(); |
| 4583 } | 4586 } |
| 4584 | 4587 |
| 4585 | 4588 |
| 4586 | 4589 |
| 4587 | 4590 |
| 4588 #undef __ | 4591 #undef __ |
| 4589 | 4592 |
| 4590 } } // namespace v8::internal | 4593 } } // namespace v8::internal |
| OLD | NEW |