| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 // the --always-opt or the --prepare-always-opt flag, we need to use the | 1326 // the --always-opt or the --prepare-always-opt flag, we need to use the |
| 1327 // runtime function so that the new function we are creating here gets a | 1327 // runtime function so that the new function we are creating here gets a |
| 1328 // chance to have its code optimized and doesn't just get a copy of the | 1328 // chance to have its code optimized and doesn't just get a copy of the |
| 1329 // existing unoptimized code. | 1329 // existing unoptimized code. |
| 1330 if (!FLAG_always_opt && | 1330 if (!FLAG_always_opt && |
| 1331 !FLAG_prepare_always_opt && | 1331 !FLAG_prepare_always_opt && |
| 1332 !pretenure && | 1332 !pretenure && |
| 1333 scope()->is_function_scope() && | 1333 scope()->is_function_scope() && |
| 1334 info->num_literals() == 0) { | 1334 info->num_literals() == 0) { |
| 1335 FastNewClosureStub stub(info->language_mode(), info->is_generator()); | 1335 FastNewClosureStub stub(info->language_mode(), info->is_generator()); |
| 1336 __ Mov(x11, Operand(info)); | 1336 __ Mov(x2, Operand(info)); |
| 1337 __ Push(x11); | |
| 1338 __ CallStub(&stub); | 1337 __ CallStub(&stub); |
| 1339 } else { | 1338 } else { |
| 1340 __ Mov(x11, Operand(info)); | 1339 __ Mov(x11, Operand(info)); |
| 1341 __ LoadRoot(x10, pretenure ? Heap::kTrueValueRootIndex | 1340 __ LoadRoot(x10, pretenure ? Heap::kTrueValueRootIndex |
| 1342 : Heap::kFalseValueRootIndex); | 1341 : Heap::kFalseValueRootIndex); |
| 1343 __ Push(cp, x11, x10); | 1342 __ Push(cp, x11, x10); |
| 1344 __ CallRuntime(Runtime::kNewClosure, 3); | 1343 __ CallRuntime(Runtime::kNewClosure, 3); |
| 1345 } | 1344 } |
| 1346 context()->Plug(x0); | 1345 context()->Plug(x0); |
| 1347 } | 1346 } |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2828 __ Ldr(proto_map, FieldMemOperand(prototype, HeapObject::kMapOffset)); | 2827 __ Ldr(proto_map, FieldMemOperand(prototype, HeapObject::kMapOffset)); |
| 2829 __ Ldr(global_idx, GlobalObjectMemOperand()); | 2828 __ Ldr(global_idx, GlobalObjectMemOperand()); |
| 2830 __ Ldr(native_context, | 2829 __ Ldr(native_context, |
| 2831 FieldMemOperand(global_idx, GlobalObject::kNativeContextOffset)); | 2830 FieldMemOperand(global_idx, GlobalObject::kNativeContextOffset)); |
| 2832 __ Ldr(string_proto, | 2831 __ Ldr(string_proto, |
| 2833 ContextMemOperand(native_context, | 2832 ContextMemOperand(native_context, |
| 2834 Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); | 2833 Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); |
| 2835 __ Cmp(proto_map, string_proto); | 2834 __ Cmp(proto_map, string_proto); |
| 2836 __ B(ne, if_false); | 2835 __ B(ne, if_false); |
| 2837 | 2836 |
| 2838 // Set the bit in the map to indicate that it has been checked safe for | |
| 2839 // default valueOf and set true result. | |
| 2840 __ Orr(bitfield2, bitfield2, 1 << Map::kStringWrapperSafeForDefaultValueOf); | |
| 2841 __ Strb(bitfield2, FieldMemOperand(map, Map::kBitField2Offset)); | |
| 2842 __ B(if_true); | 2837 __ B(if_true); |
| 2843 | 2838 |
| 2844 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2839 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 2845 context()->Plug(if_true, if_false); | 2840 context()->Plug(if_true, if_false); |
| 2846 } | 2841 } |
| 2847 | 2842 |
| 2848 | 2843 |
| 2849 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { | 2844 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { |
| 2850 ZoneList<Expression*>* args = expr->arguments(); | 2845 ZoneList<Expression*>* args = expr->arguments(); |
| 2851 ASSERT(args->length() == 1); | 2846 ASSERT(args->length() == 1); |
| (...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4971 return previous_; | 4966 return previous_; |
| 4972 } | 4967 } |
| 4973 | 4968 |
| 4974 | 4969 |
| 4975 #undef __ | 4970 #undef __ |
| 4976 | 4971 |
| 4977 | 4972 |
| 4978 } } // namespace v8::internal | 4973 } } // namespace v8::internal |
| 4979 | 4974 |
| 4980 #endif // V8_TARGET_ARCH_A64 | 4975 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |