| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 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 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2773   __ lbu(a2, FieldMemOperand(a1, Map::kBitField2Offset)); |  2773   __ lbu(a2, FieldMemOperand(a1, Map::kBitField2Offset)); | 
|  2774   __ Or(a2, a2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); |  2774   __ Or(a2, a2, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); | 
|  2775   __ sb(a2, FieldMemOperand(a1, Map::kBitField2Offset)); |  2775   __ sb(a2, FieldMemOperand(a1, Map::kBitField2Offset)); | 
|  2776   __ jmp(if_true); |  2776   __ jmp(if_true); | 
|  2777  |  2777  | 
|  2778   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |  2778   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
|  2779   context()->Plug(if_true, if_false); |  2779   context()->Plug(if_true, if_false); | 
|  2780 } |  2780 } | 
|  2781  |  2781  | 
|  2782  |  2782  | 
 |  2783 void FullCodeGenerator::EmitIsSymbol(CallRuntime* expr) { | 
 |  2784   ZoneList<Expression*>* args = expr->arguments(); | 
 |  2785   ASSERT(args->length() == 1); | 
 |  2786  | 
 |  2787   VisitForAccumulatorValue(args->at(0)); | 
 |  2788  | 
 |  2789   Label materialize_true, materialize_false; | 
 |  2790   Label* if_true = NULL; | 
 |  2791   Label* if_false = NULL; | 
 |  2792   Label* fall_through = NULL; | 
 |  2793   context()->PrepareTest(&materialize_true, &materialize_false, | 
 |  2794                          &if_true, &if_false, &fall_through); | 
 |  2795  | 
 |  2796   __ JumpIfSmi(v0, if_false); | 
 |  2797   __ GetObjectType(v0, a1, a2); | 
 |  2798   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
 |  2799   Split(eq, a2, Operand(SYMBOL_TYPE), if_true, if_false, fall_through); | 
 |  2800  | 
 |  2801   context()->Plug(if_true, if_false); | 
 |  2802 } | 
 |  2803  | 
 |  2804  | 
|  2783 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { |  2805 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { | 
|  2784   ZoneList<Expression*>* args = expr->arguments(); |  2806   ZoneList<Expression*>* args = expr->arguments(); | 
|  2785   ASSERT(args->length() == 1); |  2807   ASSERT(args->length() == 1); | 
|  2786  |  2808  | 
|  2787   VisitForAccumulatorValue(args->at(0)); |  2809   VisitForAccumulatorValue(args->at(0)); | 
|  2788  |  2810  | 
|  2789   Label materialize_true, materialize_false; |  2811   Label materialize_true, materialize_false; | 
|  2790   Label* if_true = NULL; |  2812   Label* if_true = NULL; | 
|  2791   Label* if_false = NULL; |  2813   Label* if_false = NULL; | 
|  2792   Label* fall_through = NULL; |  2814   Label* fall_through = NULL; | 
| (...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4322     __ GetObjectType(v0, v0, a1); |  4344     __ GetObjectType(v0, v0, a1); | 
|  4323     __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE)); |  4345     __ Branch(if_true, eq, a1, Operand(JS_FUNCTION_TYPE)); | 
|  4324     Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE), |  4346     Split(eq, a1, Operand(JS_FUNCTION_PROXY_TYPE), | 
|  4325           if_true, if_false, fall_through); |  4347           if_true, if_false, fall_through); | 
|  4326   } else if (check->Equals(isolate()->heap()->object_string())) { |  4348   } else if (check->Equals(isolate()->heap()->object_string())) { | 
|  4327     __ JumpIfSmi(v0, if_false); |  4349     __ JumpIfSmi(v0, if_false); | 
|  4328     if (!FLAG_harmony_typeof) { |  4350     if (!FLAG_harmony_typeof) { | 
|  4329       __ LoadRoot(at, Heap::kNullValueRootIndex); |  4351       __ LoadRoot(at, Heap::kNullValueRootIndex); | 
|  4330       __ Branch(if_true, eq, v0, Operand(at)); |  4352       __ Branch(if_true, eq, v0, Operand(at)); | 
|  4331     } |  4353     } | 
 |  4354     if (FLAG_harmony_symbols) { | 
 |  4355       __ GetObjectType(v0, v0, a1); | 
 |  4356       __ Branch(if_true, eq, a1, Operand(SYMBOL_TYPE)); | 
 |  4357     } | 
|  4332     // Check for JS objects => true. |  4358     // Check for JS objects => true. | 
|  4333     __ GetObjectType(v0, v0, a1); |  4359     __ GetObjectType(v0, v0, a1); | 
|  4334     __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |  4360     __ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 
|  4335     __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset)); |  4361     __ lbu(a1, FieldMemOperand(v0, Map::kInstanceTypeOffset)); | 
|  4336     __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |  4362     __ Branch(if_false, gt, a1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 
|  4337     // Check for undetectable objects => false. |  4363     // Check for undetectable objects => false. | 
|  4338     __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |  4364     __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 
|  4339     __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |  4365     __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 
|  4340     Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); |  4366     Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through); | 
|  4341   } else { |  4367   } else { | 
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4598   *context_length = 0; |  4624   *context_length = 0; | 
|  4599   return previous_; |  4625   return previous_; | 
|  4600 } |  4626 } | 
|  4601  |  4627  | 
|  4602  |  4628  | 
|  4603 #undef __ |  4629 #undef __ | 
|  4604  |  4630  | 
|  4605 } }  // namespace v8::internal |  4631 } }  // namespace v8::internal | 
|  4606  |  4632  | 
|  4607 #endif  // V8_TARGET_ARCH_MIPS |  4633 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW |