| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 for (int i = 0; i < deoptimization_literals_.length(); ++i) { | 369 for (int i = 0; i < deoptimization_literals_.length(); ++i) { |
| 370 if (deoptimization_literals_[i].is_identical_to(literal)) return i; | 370 if (deoptimization_literals_[i].is_identical_to(literal)) return i; |
| 371 } | 371 } |
| 372 deoptimization_literals_.Add(literal, zone()); | 372 deoptimization_literals_.Add(literal, zone()); |
| 373 return result; | 373 return result; |
| 374 } | 374 } |
| 375 | 375 |
| 376 | 376 |
| 377 void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 377 void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
| 378 Safepoint::DeoptMode mode) { | 378 Safepoint::DeoptMode mode) { |
| 379 environment->set_has_been_used(); |
| 379 if (!environment->HasBeenRegistered()) { | 380 if (!environment->HasBeenRegistered()) { |
| 380 int frame_count = 0; | 381 int frame_count = 0; |
| 381 int jsframe_count = 0; | 382 int jsframe_count = 0; |
| 382 for (LEnvironment* e = environment; e != NULL; e = e->outer()) { | 383 for (LEnvironment* e = environment; e != NULL; e = e->outer()) { |
| 383 ++frame_count; | 384 ++frame_count; |
| 384 if (e->frame_type() == JS_FUNCTION) { | 385 if (e->frame_type() == JS_FUNCTION) { |
| 385 ++jsframe_count; | 386 ++jsframe_count; |
| 386 } | 387 } |
| 387 } | 388 } |
| 388 Translation translation(&translations_, frame_count, jsframe_count, zone()); | 389 Translation translation(&translations_, frame_count, jsframe_count, zone()); |
| (...skipping 5560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5949 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5950 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5950 // Index is equal to negated out of object property index plus 1. | 5951 // Index is equal to negated out of object property index plus 1. |
| 5951 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5952 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5952 __ Ldr(result, FieldMemOperand(result, | 5953 __ Ldr(result, FieldMemOperand(result, |
| 5953 FixedArray::kHeaderSize - kPointerSize)); | 5954 FixedArray::kHeaderSize - kPointerSize)); |
| 5954 __ Bind(deferred->exit()); | 5955 __ Bind(deferred->exit()); |
| 5955 __ Bind(&done); | 5956 __ Bind(&done); |
| 5956 } | 5957 } |
| 5957 | 5958 |
| 5958 } } // namespace v8::internal | 5959 } } // namespace v8::internal |
| OLD | NEW |