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 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3253 } | 3253 } |
3254 } | 3254 } |
3255 | 3255 |
3256 | 3256 |
3257 Handle<Object> SlotRef::GetValue(Isolate* isolate) { | 3257 Handle<Object> SlotRef::GetValue(Isolate* isolate) { |
3258 switch (representation_) { | 3258 switch (representation_) { |
3259 case TAGGED: | 3259 case TAGGED: |
3260 return Handle<Object>(Memory::Object_at(addr_), isolate); | 3260 return Handle<Object>(Memory::Object_at(addr_), isolate); |
3261 | 3261 |
3262 case INT32: { | 3262 case INT32: { |
| 3263 #if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT |
| 3264 int value = Memory::int32_at(addr_ + kIntSize); |
| 3265 #else |
3263 int value = Memory::int32_at(addr_); | 3266 int value = Memory::int32_at(addr_); |
| 3267 #endif |
3264 if (Smi::IsValid(value)) { | 3268 if (Smi::IsValid(value)) { |
3265 return Handle<Object>(Smi::FromInt(value), isolate); | 3269 return Handle<Object>(Smi::FromInt(value), isolate); |
3266 } else { | 3270 } else { |
3267 return isolate->factory()->NewNumberFromInt(value); | 3271 return isolate->factory()->NewNumberFromInt(value); |
3268 } | 3272 } |
3269 } | 3273 } |
3270 | 3274 |
3271 case UINT32: { | 3275 case UINT32: { |
| 3276 #if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT |
| 3277 uint32_t value = Memory::uint32_at(addr_ + kIntSize); |
| 3278 #else |
3272 uint32_t value = Memory::uint32_at(addr_); | 3279 uint32_t value = Memory::uint32_at(addr_); |
| 3280 #endif |
3273 if (value <= static_cast<uint32_t>(Smi::kMaxValue)) { | 3281 if (value <= static_cast<uint32_t>(Smi::kMaxValue)) { |
3274 return Handle<Object>(Smi::FromInt(static_cast<int>(value)), isolate); | 3282 return Handle<Object>(Smi::FromInt(static_cast<int>(value)), isolate); |
3275 } else { | 3283 } else { |
3276 return isolate->factory()->NewNumber(static_cast<double>(value)); | 3284 return isolate->factory()->NewNumber(static_cast<double>(value)); |
3277 } | 3285 } |
3278 } | 3286 } |
3279 | 3287 |
3280 case DOUBLE: { | 3288 case DOUBLE: { |
3281 double value = read_double_value(addr_); | 3289 double value = read_double_value(addr_); |
3282 return isolate->factory()->NewNumber(value); | 3290 return isolate->factory()->NewNumber(value); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3580 } | 3588 } |
3581 | 3589 |
3582 | 3590 |
3583 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3591 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
3584 v->VisitPointer(BitCast<Object**>(&function_)); | 3592 v->VisitPointer(BitCast<Object**>(&function_)); |
3585 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3593 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
3586 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3594 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
3587 } | 3595 } |
3588 | 3596 |
3589 } } // namespace v8::internal | 3597 } } // namespace v8::internal |
OLD | NEW |