| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 14497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14508 FieldIndex field_index = | 14508 FieldIndex field_index = |
| 14509 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); | 14509 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); |
| 14510 if (field_index.is_inobject()) { | 14510 if (field_index.is_inobject()) { |
| 14511 RUNTIME_ASSERT(field_index.property_index() < | 14511 RUNTIME_ASSERT(field_index.property_index() < |
| 14512 object->map()->inobject_properties()); | 14512 object->map()->inobject_properties()); |
| 14513 } else { | 14513 } else { |
| 14514 RUNTIME_ASSERT(field_index.outobject_array_index() < | 14514 RUNTIME_ASSERT(field_index.outobject_array_index() < |
| 14515 object->properties()->length()); | 14515 object->properties()->length()); |
| 14516 } | 14516 } |
| 14517 Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate); | 14517 Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate); |
| 14518 RUNTIME_ASSERT(raw_value->IsMutableHeapNumber()); | 14518 RUNTIME_ASSERT(raw_value->IsNumber() || raw_value->IsUninitialized()); |
| 14519 return *Object::WrapForRead(isolate, raw_value, Representation::Double()); | 14519 return *Object::NewStorageFor(isolate, raw_value, Representation::Double()); |
| 14520 } | 14520 } |
| 14521 | 14521 |
| 14522 | 14522 |
| 14523 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { | 14523 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { |
| 14524 HandleScope scope(isolate); | 14524 HandleScope scope(isolate); |
| 14525 ASSERT(args.length() == 1); | 14525 ASSERT(args.length() == 1); |
| 14526 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 14526 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 14527 if (!object->IsJSObject()) return Smi::FromInt(0); | 14527 if (!object->IsJSObject()) return Smi::FromInt(0); |
| 14528 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 14528 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
| 14529 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); | 14529 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15090 } | 15090 } |
| 15091 return NULL; | 15091 return NULL; |
| 15092 } | 15092 } |
| 15093 | 15093 |
| 15094 | 15094 |
| 15095 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15095 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15096 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15096 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15097 } | 15097 } |
| 15098 | 15098 |
| 15099 } } // namespace v8::internal | 15099 } } // namespace v8::internal |
| OLD | NEW |