| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
| 6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
| 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
| 8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
| 9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 70 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 71 | 71 |
| 72 __ movl(EBX, Address(ESP, + 3 * kWordSize)); // Array. | 72 __ movl(EBX, Address(ESP, + 3 * kWordSize)); // Array. |
| 73 __ movl(EBX, FieldAddress(EBX, type_args_field_offset)); | 73 __ movl(EBX, FieldAddress(EBX, type_args_field_offset)); |
| 74 // EBX: Type arguments of array. | 74 // EBX: Type arguments of array. |
| 75 __ cmpl(EBX, raw_null); | 75 __ cmpl(EBX, raw_null); |
| 76 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 76 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 77 // Check if it's dynamic. | 77 // Check if it's dynamic. |
| 78 // Get type at index 0. | 78 // Get type at index 0. |
| 79 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0))); | 79 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0))); |
| 80 __ CompareObject(EAX, Type::ZoneHandle(Type::DynamicType())); | 80 __ CompareObject(EAX, Object::dynamic_type()); |
| 81 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 81 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 82 // Check for int and num. | 82 // Check for int and num. |
| 83 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi? | 83 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi? |
| 84 __ j(NOT_ZERO, &fall_through); // Non-smi value. | 84 __ j(NOT_ZERO, &fall_through); // Non-smi value. |
| 85 __ CompareObject(EAX, Type::ZoneHandle(Type::IntType())); | 85 __ CompareObject(EAX, Type::ZoneHandle(Type::IntType())); |
| 86 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 86 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 87 __ CompareObject(EAX, Type::ZoneHandle(Type::Number())); | 87 __ CompareObject(EAX, Type::ZoneHandle(Type::Number())); |
| 88 __ j(NOT_EQUAL, &fall_through); | 88 __ j(NOT_EQUAL, &fall_through); |
| 89 __ Bind(&checked_ok); | 89 __ Bind(&checked_ok); |
| 90 } | 90 } |
| (...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2153 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2154 __ LoadIsolate(EAX); | 2154 __ LoadIsolate(EAX); |
| 2155 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2155 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
| 2156 __ ret(); | 2156 __ ret(); |
| 2157 } | 2157 } |
| 2158 | 2158 |
| 2159 #undef __ | 2159 #undef __ |
| 2160 } // namespace dart | 2160 } // namespace dart |
| 2161 | 2161 |
| 2162 #endif // defined TARGET_ARCH_IA32 | 2162 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |