OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2052 __ movq(rbx, FieldOperand(rax, HeapObject::kMapOffset)); | 2052 __ movq(rbx, FieldOperand(rax, HeapObject::kMapOffset)); |
2053 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), | 2053 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), |
2054 Immediate(1 << Map::kIsUndetectable)); | 2054 Immediate(1 << Map::kIsUndetectable)); |
2055 __ j(not_zero, if_true); | 2055 __ j(not_zero, if_true); |
2056 __ jmp(if_false); | 2056 __ jmp(if_false); |
2057 | 2057 |
2058 Apply(context_, if_true, if_false); | 2058 Apply(context_, if_true, if_false); |
2059 } | 2059 } |
2060 | 2060 |
2061 | 2061 |
| 2062 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
| 2063 ZoneList<Expression*>* args) { |
| 2064 ASSERT(args->length() == 1); |
| 2065 |
| 2066 VisitForValue(args->at(0), kAccumulator); |
| 2067 |
| 2068 Label materialize_true, materialize_false; |
| 2069 Label* if_true = NULL; |
| 2070 Label* if_false = NULL; |
| 2071 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); |
| 2072 |
| 2073 // Just indicate false, as %_IsStringWrapperSafeForDefaultValueOf() is only |
| 2074 // used in a few functions in runtime.js which should not normally be hit by |
| 2075 // this compiler. |
| 2076 __ jmp(if_false); |
| 2077 Apply(context_, if_true, if_false); |
| 2078 } |
| 2079 |
| 2080 |
2062 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) { | 2081 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) { |
2063 ASSERT(args->length() == 1); | 2082 ASSERT(args->length() == 1); |
2064 | 2083 |
2065 VisitForValue(args->at(0), kAccumulator); | 2084 VisitForValue(args->at(0), kAccumulator); |
2066 | 2085 |
2067 Label materialize_true, materialize_false; | 2086 Label materialize_true, materialize_false; |
2068 Label* if_true = NULL; | 2087 Label* if_true = NULL; |
2069 Label* if_false = NULL; | 2088 Label* if_false = NULL; |
2070 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); | 2089 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); |
2071 | 2090 |
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3327 __ ret(0); | 3346 __ ret(0); |
3328 } | 3347 } |
3329 | 3348 |
3330 | 3349 |
3331 #undef __ | 3350 #undef __ |
3332 | 3351 |
3333 | 3352 |
3334 } } // namespace v8::internal | 3353 } } // namespace v8::internal |
3335 | 3354 |
3336 #endif // V8_TARGET_ARCH_X64 | 3355 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |