Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: src/runtime/runtime-object.cc

Issue 391693002: In-object double fields unboxing (for 64-bit only). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/property-details.h ('k') | src/string-stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 RUNTIME_ASSERT((index->value() & 1) == 1); 1393 RUNTIME_ASSERT((index->value() & 1) == 1);
1394 FieldIndex field_index = 1394 FieldIndex field_index =
1395 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); 1395 FieldIndex::ForLoadByFieldIndex(object->map(), index->value());
1396 if (field_index.is_inobject()) { 1396 if (field_index.is_inobject()) {
1397 RUNTIME_ASSERT(field_index.property_index() < 1397 RUNTIME_ASSERT(field_index.property_index() <
1398 object->map()->inobject_properties()); 1398 object->map()->inobject_properties());
1399 } else { 1399 } else {
1400 RUNTIME_ASSERT(field_index.outobject_array_index() < 1400 RUNTIME_ASSERT(field_index.outobject_array_index() <
1401 object->properties()->length()); 1401 object->properties()->length());
1402 } 1402 }
1403 Handle<Object> raw_value(object->RawFastPropertyAt(field_index), isolate); 1403 return *JSObject::FastPropertyAt(object, Representation::Double(),
1404 RUNTIME_ASSERT(raw_value->IsMutableHeapNumber()); 1404 field_index);
1405 return *Object::WrapForRead(isolate, raw_value, Representation::Double());
1406 } 1405 }
1407 1406
1408 1407
1409 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { 1408 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) {
1410 HandleScope scope(isolate); 1409 HandleScope scope(isolate);
1411 DCHECK(args.length() == 1); 1410 DCHECK(args.length() == 1);
1412 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 1411 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
1413 if (!object->IsJSObject()) return Smi::FromInt(0); 1412 if (!object->IsJSObject()) return Smi::FromInt(0);
1414 Handle<JSObject> js_object = Handle<JSObject>::cast(object); 1413 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
1415 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); 1414 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 1579
1581 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1580 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1582 SealHandleScope shs(isolate); 1581 SealHandleScope shs(isolate);
1583 DCHECK(args.length() == 1); 1582 DCHECK(args.length() == 1);
1584 CONVERT_ARG_CHECKED(Object, obj, 0); 1583 CONVERT_ARG_CHECKED(Object, obj, 0);
1585 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1584 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1586 return JSReceiver::cast(obj)->class_name(); 1585 return JSReceiver::cast(obj)->class_name();
1587 } 1586 }
1588 } 1587 }
1589 } // namespace v8::internal 1588 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698