Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
| (...skipping 3371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3382 | 3382 |
| 3383 Handle<Object> SlotRefValueBuilder::GetNext(Isolate* isolate, int lvl) { | 3383 Handle<Object> SlotRefValueBuilder::GetNext(Isolate* isolate, int lvl) { |
| 3384 SlotRef& slot = slot_refs_[current_slot_]; | 3384 SlotRef& slot = slot_refs_[current_slot_]; |
| 3385 current_slot_++; | 3385 current_slot_++; |
| 3386 switch (slot.Representation()) { | 3386 switch (slot.Representation()) { |
| 3387 case SlotRef::TAGGED: | 3387 case SlotRef::TAGGED: |
| 3388 case SlotRef::INT32: | 3388 case SlotRef::INT32: |
| 3389 case SlotRef::UINT32: | 3389 case SlotRef::UINT32: |
| 3390 case SlotRef::DOUBLE: | 3390 case SlotRef::DOUBLE: |
| 3391 case SlotRef::LITERAL: { | 3391 case SlotRef::LITERAL: { |
| 3392 return slot.GetValue(isolate); | 3392 Handle<Object> value = slot.GetValue(isolate); |
| 3393 if (value->IsMutableHeapNumber()) { | |
|
Igor Sheludko
2015/02/17 15:07:54
I think we could save some cycles if we put this c
Jarin
2015/02/17 15:20:48
Done. (Even though there is so much stuff going on
| |
| 3394 HeapNumber::cast(*value)->set_map(isolate->heap()->heap_number_map()); | |
| 3395 } | |
| 3396 return value; | |
| 3393 } | 3397 } |
| 3394 case SlotRef::ARGUMENTS_OBJECT: { | 3398 case SlotRef::ARGUMENTS_OBJECT: { |
| 3395 // We should never need to materialize an arguments object, | 3399 // We should never need to materialize an arguments object, |
| 3396 // but we still need to put something into the array | 3400 // but we still need to put something into the array |
| 3397 // so that the indexing is consistent. | 3401 // so that the indexing is consistent. |
| 3398 materialized_objects_.Add(isolate->factory()->undefined_value()); | 3402 materialized_objects_.Add(isolate->factory()->undefined_value()); |
| 3399 int length = slot.GetChildrenCount(); | 3403 int length = slot.GetChildrenCount(); |
| 3400 for (int i = 0; i < length; ++i) { | 3404 for (int i = 0; i < length; ++i) { |
| 3401 // We don't need the argument, just ignore it | 3405 // We don't need the argument, just ignore it |
| 3402 GetNext(isolate, lvl + 1); | 3406 GetNext(isolate, lvl + 1); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3663 Deoptimizer::GetDeoptimizationId(isolate, info->target_address(), | 3667 Deoptimizer::GetDeoptimizationId(isolate, info->target_address(), |
| 3664 Deoptimizer::LAZY))) { | 3668 Deoptimizer::LAZY))) { |
| 3665 CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); | 3669 CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); |
| 3666 return DeoptInfo(last_position, NULL, last_reason); | 3670 return DeoptInfo(last_position, NULL, last_reason); |
| 3667 } | 3671 } |
| 3668 } | 3672 } |
| 3669 } | 3673 } |
| 3670 return DeoptInfo(0, NULL, Deoptimizer::kNoReason); | 3674 return DeoptInfo(0, NULL, Deoptimizer::kNoReason); |
| 3671 } | 3675 } |
| 3672 } } // namespace v8::internal | 3676 } } // namespace v8::internal |
| OLD | NEW |