| 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 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3088       __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3088       __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 
| 3089       DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); | 3089       DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); | 
| 3090     } | 3090     } | 
| 3091   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3091   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 
| 3092     DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3092     DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 
| 3093     Label done; | 3093     Label done; | 
| 3094     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3094     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 
| 3095     __ Branch(&done, ne, result, Operand(scratch)); | 3095     __ Branch(&done, ne, result, Operand(scratch)); | 
| 3096     if (info()->IsStub()) { | 3096     if (info()->IsStub()) { | 
| 3097       // A stub can safely convert the hole to undefined only if the array | 3097       // A stub can safely convert the hole to undefined only if the array | 
| 3098       // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3098       // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid. | 
|  | 3099       // Otherwise | 
| 3099       // it needs to bail out. | 3100       // it needs to bail out. | 
| 3100       __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3101       __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex); | 
| 3101       __ lw(result, FieldMemOperand(result, Cell::kValueOffset)); | 3102       __ lw(result, FieldMemOperand(result, Cell::kValueOffset)); | 
| 3102       DeoptimizeIf(ne, instr, Deoptimizer::kHole, result, | 3103       DeoptimizeIf( | 
| 3103                    Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); | 3104           ne, instr, Deoptimizer::kHole, result, | 
|  | 3105           Operand(Smi::FromInt(Isolate::kArrayElementsProtectorValid))); | 
| 3104     } | 3106     } | 
| 3105     __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 3107     __ LoadRoot(result, Heap::kUndefinedValueRootIndex); | 
| 3106     __ bind(&done); | 3108     __ bind(&done); | 
| 3107   } | 3109   } | 
| 3108 } | 3110 } | 
| 3109 | 3111 | 
| 3110 | 3112 | 
| 3111 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 3113 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { | 
| 3112   if (instr->is_fixed_typed_array()) { | 3114   if (instr->is_fixed_typed_array()) { | 
| 3113     DoLoadKeyedExternalArray(instr); | 3115     DoLoadKeyedExternalArray(instr); | 
| (...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5849   __ Push(at, ToRegister(instr->function())); | 5851   __ Push(at, ToRegister(instr->function())); | 
| 5850   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5852   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
| 5851   RecordSafepoint(Safepoint::kNoLazyDeopt); | 5853   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 5852 } | 5854 } | 
| 5853 | 5855 | 
| 5854 | 5856 | 
| 5855 #undef __ | 5857 #undef __ | 
| 5856 | 5858 | 
| 5857 }  // namespace internal | 5859 }  // namespace internal | 
| 5858 }  // namespace v8 | 5860 }  // namespace v8 | 
| OLD | NEW | 
|---|