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

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

Issue 1276533003: [runtime] Store constructor function index on primitive maps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm failures Created 5 years, 4 months 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
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | src/x64/builtins-x64.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/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 RUNTIME_FUNCTION(Runtime_LoadMutableDouble) { 1186 RUNTIME_FUNCTION(Runtime_LoadMutableDouble) {
1187 HandleScope scope(isolate); 1187 HandleScope scope(isolate);
1188 DCHECK(args.length() == 2); 1188 DCHECK(args.length() == 2);
1189 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 1189 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1190 CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1); 1190 CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1);
1191 RUNTIME_ASSERT((index->value() & 1) == 1); 1191 RUNTIME_ASSERT((index->value() & 1) == 1);
1192 FieldIndex field_index = 1192 FieldIndex field_index =
1193 FieldIndex::ForLoadByFieldIndex(object->map(), index->value()); 1193 FieldIndex::ForLoadByFieldIndex(object->map(), index->value());
1194 if (field_index.is_inobject()) { 1194 if (field_index.is_inobject()) {
1195 RUNTIME_ASSERT(field_index.property_index() < 1195 RUNTIME_ASSERT(field_index.property_index() <
1196 object->map()->inobject_properties()); 1196 object->map()->GetInObjectProperties());
1197 } else { 1197 } else {
1198 RUNTIME_ASSERT(field_index.outobject_array_index() < 1198 RUNTIME_ASSERT(field_index.outobject_array_index() <
1199 object->properties()->length()); 1199 object->properties()->length());
1200 } 1200 }
1201 return *JSObject::FastPropertyAt(object, Representation::Double(), 1201 return *JSObject::FastPropertyAt(object, Representation::Double(),
1202 field_index); 1202 field_index);
1203 } 1203 }
1204 1204
1205 1205
1206 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) { 1206 RUNTIME_FUNCTION(Runtime_TryMigrateInstance) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 Handle<JSReceiver> receiver; 1445 Handle<JSReceiver> receiver;
1446 if (JSReceiver::ToObject(isolate, object).ToHandle(&receiver)) { 1446 if (JSReceiver::ToObject(isolate, object).ToHandle(&receiver)) {
1447 return *receiver; 1447 return *receiver;
1448 } 1448 }
1449 THROW_NEW_ERROR_RETURN_FAILURE( 1449 THROW_NEW_ERROR_RETURN_FAILURE(
1450 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject)); 1450 isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject));
1451 } 1451 }
1452 1452
1453 } // namespace internal 1453 } // namespace internal
1454 } // namespace v8 1454 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-collections.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698