| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved.7 |     1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 
|     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 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2317                                Handle<String>class_name, |  2317                                Handle<String>class_name, | 
|  2318                                Register input, |  2318                                Register input, | 
|  2319                                Register temp, |  2319                                Register temp, | 
|  2320                                Register temp2) { |  2320                                Register temp2) { | 
|  2321   DCHECK(!input.is(temp)); |  2321   DCHECK(!input.is(temp)); | 
|  2322   DCHECK(!input.is(temp2)); |  2322   DCHECK(!input.is(temp2)); | 
|  2323   DCHECK(!temp.is(temp2)); |  2323   DCHECK(!temp.is(temp2)); | 
|  2324  |  2324  | 
|  2325   __ JumpIfSmi(input, is_false); |  2325   __ JumpIfSmi(input, is_false); | 
|  2326   __ GetObjectType(input, temp, temp2); |  2326   __ GetObjectType(input, temp, temp2); | 
 |  2327   STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); | 
|  2327   if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |  2328   if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 
|  2328     __ Branch(is_true, eq, temp2, Operand(JS_FUNCTION_TYPE)); |  2329     __ Branch(is_true, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); | 
|  2329   } else { |  2330   } else { | 
|  2330     __ Branch(is_false, eq, temp2, Operand(JS_FUNCTION_TYPE)); |  2331     __ Branch(is_false, hs, temp2, Operand(FIRST_FUNCTION_TYPE)); | 
|  2331   } |  2332   } | 
|  2332  |  2333  | 
|  2333   // Check if the constructor in the map is a function. |  2334   // Check if the constructor in the map is a function. | 
|  2334   Register instance_type = scratch1(); |  2335   Register instance_type = scratch1(); | 
|  2335   DCHECK(!instance_type.is(temp)); |  2336   DCHECK(!instance_type.is(temp)); | 
|  2336   __ GetMapConstructor(temp, temp, temp2, instance_type); |  2337   __ GetMapConstructor(temp, temp, temp2, instance_type); | 
|  2337  |  2338  | 
|  2338   // Objects with a non-function constructor have class 'Object'. |  2339   // Objects with a non-function constructor have class 'Object'. | 
|  2339   if (String::Equals(class_name, isolate()->factory()->Object_string())) { |  2340   if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 
|  2340     __ Branch(is_true, ne, instance_type, Operand(JS_FUNCTION_TYPE)); |  2341     __ Branch(is_true, ne, instance_type, Operand(JS_FUNCTION_TYPE)); | 
| (...skipping 3236 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5577   __ lw(result, FieldMemOperand(scratch, |  5578   __ lw(result, FieldMemOperand(scratch, | 
|  5578                                 FixedArray::kHeaderSize - kPointerSize)); |  5579                                 FixedArray::kHeaderSize - kPointerSize)); | 
|  5579   __ bind(deferred->exit()); |  5580   __ bind(deferred->exit()); | 
|  5580   __ bind(&done); |  5581   __ bind(&done); | 
|  5581 } |  5582 } | 
|  5582  |  5583  | 
|  5583 #undef __ |  5584 #undef __ | 
|  5584  |  5585  | 
|  5585 }  // namespace internal |  5586 }  // namespace internal | 
|  5586 }  // namespace v8 |  5587 }  // namespace v8 | 
| OLD | NEW |