| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/debug.h" | 9 #include "src/debug.h" |
| 10 #include "src/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 RUNTIME_ASSERT((index->value() & 1) == 1); | 1391 RUNTIME_ASSERT((index->value() & 1) == 1); |
| 1392 FieldIndex field_index = | 1392 FieldIndex field_index = |
| 1393 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); | 1393 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); |
| 1394 if (field_index.is_inobject()) { | 1394 if (field_index.is_inobject()) { |
| 1395 RUNTIME_ASSERT(field_index.property_index() < | 1395 RUNTIME_ASSERT(field_index.property_index() < |
| 1396 object->map()->inobject_properties()); | 1396 object->map()->inobject_properties()); |
| 1397 } else { | 1397 } else { |
| 1398 RUNTIME_ASSERT(field_index.outobject_array_index() < | 1398 RUNTIME_ASSERT(field_index.outobject_array_index() < |
| 1399 object->properties()->length()); | 1399 object->properties()->length()); |
| 1400 } | 1400 } |
| 1401 Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate); | 1401 return *JSObject::FastPropertyAt(object, Representation::Double(), |
| 1402 RUNTIME_ASSERT(raw_value->IsMutableHeapNumber()); | 1402 field_index); |
| 1403 return *Object::WrapForRead(isolate, raw_value, Representation::Double()); | |
| 1404 } | 1403 } |
| 1405 | 1404 |
| 1406 | 1405 |
| 1407 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { | 1406 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { |
| 1408 HandleScope scope(isolate); | 1407 HandleScope scope(isolate); |
| 1409 DCHECK(args.length() == 1); | 1408 DCHECK(args.length() == 1); |
| 1410 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 1409 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 1411 if (!object->IsJSObject()) return Smi::FromInt(0); | 1410 if (!object->IsJSObject()) return Smi::FromInt(0); |
| 1412 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 1411 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
| 1413 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); | 1412 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 | 1577 |
| 1579 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { | 1578 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { |
| 1580 SealHandleScope shs(isolate); | 1579 SealHandleScope shs(isolate); |
| 1581 DCHECK(args.length() == 1); | 1580 DCHECK(args.length() == 1); |
| 1582 CONVERT_ARG_CHECKED(Object, obj, 0); | 1581 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1583 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); | 1582 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); |
| 1584 return JSReceiver::cast(obj)->class_name(); | 1583 return JSReceiver::cast(obj)->class_name(); |
| 1585 } | 1584 } |
| 1586 } | 1585 } |
| 1587 } // namespace v8::internal | 1586 } // namespace v8::internal |
| OLD | NEW |